Файлы к уроку:
- Для спонсоров Boosty
- Для спонсоров VK
Ссылки:
- Страница курса
- Плейлист YouTube
- Плейлист ВК
Описание
Мы собираемся импортировать таблицу с этой страницы. Когда мы пытаемся изменить тип данных для столбцов с датой, то возвращается столбец с ошибкой DateFormat.Error.
Решение
Если не получается преобразовать столбец с текстом в дату, то значит в строке присутствуют лишние символы.
С помощь функции Text.Length мы можем убедиться, что длина строки намного больше, чем ожидается. Мы видим 10 символов, но функция возвращает 15.
С помощью функции Text.Start извлечем 1 символ сначала строки. Потом получим код этого символа с помощью функции Character.ToNumber. Получаем 8206.
Далее воспользуемся функционалом замены подстроки и исправляем получившуюся формулу:
Table.ReplaceValue(
get_table,
Character.FromNumber(8206),
"",
Replacer.ReplaceText,
{
"Дата начала купонного периода",
"Дата выплаты купона",
"Дата фиксации списка держателей"
}
)
Примененные функции
- Text.Length
- Text.Start
- Character.ToNumber
- Web.Page
- Web.Contents
- Table.SelectRows
- Table.ReplaceValue
- Character.FromNumber
- Replacer.ReplaceText
- Table.TransformColumnTypes
Код
let
source = Web.Page(
Web.Contents(
"https://www.moex.com/ru/issue.aspx?board=TQCB&code=RU000A102036#/bond_4"
)
),
get_table = Table.SelectRows(
source,
each ([ClassName] = "coupon-payment-schedule__table")
){0}[Data],
cols_replace = Table.ReplaceValue(
get_table,
Character.FromNumber(8206),
"",
Replacer.ReplaceText,
{
"Дата начала купонного периода",
"Дата выплаты купона",
"Дата фиксации списка держателей"
}
),
cols_types = Table.TransformColumnTypes(
cols_replace,
{
{"Дата начала купонного периода", type date},
{"Дата выплаты купона", type date},
{"Дата фиксации списка держателей", type date}
}
)
in
cols_types
Этот урок входит в курс Работа с ошибками в Power Query
Номер урока | Урок | Описание |
---|---|---|
1 | Power Query Ошибки №1. Измененный тип, Неверная фильтрация в UI | Почему возникает ошибка Expression.Error Столбец таблицы не найден? Одна из причин — шаг Измененный тип. Почему в вашей итоговой таблицы не все данные, которые должны там оказаться? Вероятно вы совершили ошибку неверной фильтрации в пользовательском интерфейсе. |
2 | Power Query Ошибки №2. Фиксированная ширина столбца Excel | В этом уроке вы узнаете как отключить автоматическое определение ширины столбцов таблицы Excel при обновлении запроса Power Query. |
3 | Power Query Ошибки №3. Formula Firewall, запрос ссылается на… | Вы работаете в Power Query, но при попытке обновить все возникает ошибка Formula Firewall, запрос ссылается на… Что делать? Как исправить? |
4 | Power Query Ошибки №4. Доступ к веб-содержимому | В этом уроке вы узнаете как избавиться от надоедливого окна доступ к веб-содержимому. |
5 | Power Query Ошибки №5. Количество столбцов CSV | При импорте CSV получается неверное количество столбцов. |
6 | Power Query Ошибки №6. Не получается изменить тип данных (DataFormat.Error) | При попытке изменить тип данных с текстового на дату возникает ошибка DataFormat.Error. |
7 | Power Query Ошибки №7. Разные имена листов | В этом уроке мы решим проблему, когда в ваших источниках нужные вам данные находятся всегда на листах с разными именами. |
8 | Power Query Ошибки №8. Разные имена листов 2 | В этом уроке мы другими способами решим проблему, когда в ваших источниках нужные вам данные находятся всегда на листах с разными именами. |
9 | Power Query Ошибки №9. Разные имена столбцов, Table.TransformColumnNames | В этом уроке мы разберем проблему, когда нам присылают файлы, в которых всегда столбцы названы по-разному. |
10 | Power Query Ошибки №10. Как развернуть все столбцы | В этой задаче мы научимся разворачивать все столбцы табличного столбца не перечисляя каждый из них хардкодом. |
11 | Power Query Ошибки №11. Подключиться к последнему файлу | В этом уроке мы научимся подключаться к самому свежему файлу из нужной нам папки с нужным названием. |
12 | Power Query Ошибки №12. Консолидация и MissingField.Type | Бывает вы ходите выполнить добавление таблиц друг под другом с предварительной обработкой, но получаете ошибку Expression.Error: Столбец таблицы не найден. |
13 | Power Query Ошибки №13. Удалить пустые столбцы | Как без хардкода автоматически удалить пустые столбцы в Power Query, которые есть в импортируемой таблицы. Разберем 2 способа. Один из них прост до безобразия, а для второго понадобится функция Table.Profile. |
14 | Power Query Ошибки №14. Удалить лишние пробелы | В этом уроке мы разберем еще 1 способ удалить лишние пробелы в текстовом столбце Power Query. Для этого мы повторим и изучим несколько новых функций. Text.SplitAny List.Select Character.FromNumber Text.Combine |
15 | Power Query Ошибки №15. Плохо структурированный TXT | Как быть, если текстовый файл разбивается на столбцы неправильно? |
16 | Power Query Ошибки №16. При округлении не совпадает общая сумма | Разберем ошибку, которая возникает при необходимости разбить число на определенные доли, а результаты округлить до двух знаков после запятой. В такой ситуации может получиться, что сумма слагаемых не будет равняться исходному числу. |
17 | Power Query Ошибки №17. Удаление дубликатов, Подводные камни Table. Distinct | Что может пойти не так при использовании функции удаления дубликатов. |
18 | Power Query Ошибки №18. Удаление дубликатов 2, Подводные камни Table. Distinct | Что может пойти не так при использовании функции удаления дубликатов. Другое решение данной проблемы. |
19 | Power Query Ошибки №19. Неверная разбивка на столбцы | При импорте данных из CSV или TXT разбивка на столбцы происходит неправильно. |
20 | Power Query Ошибки №20. Пустая таблица при импорте Excel (XLSX, XLS) | Вы пытаетесь подключиться к книге Excel, но импортируется пустая таблица. |
21 | Power Query Ошибки №21. Подключение к PostgreSQL, Установка драйвера | Вы пытаетесь подключиться к PostgreSQL и получаете ошибку «Перед использование этого соединителя необходимо установить один или несколько дополнительных компонентов» |
Announcing the MPPC’s Got Power Talent Show at #MPPC23
Are you attending the Microsoft Power Platform Conference 2023 in Las Vegas? If so, we invite you to join us for the MPPC’s Got Power Talent Show!
Our talent show is more than a show—it’s a grand celebration of connection, inspiration, and shared journeys. Through stories, skills, and collective experiences, we come together to uplift, inspire, and revel in the magic of our community’s diverse talents. This year, our talent event promises to be an unforgettable experience, echoing louder and brighter than anything you’ve seen before.
We’re casting a wider net with three captivating categories:
Demo Technical Solutions: Show us your Power Platform innovations, be it apps, flows, chatbots, websites or dashboards… Storytelling: Share tales of your journey with Power Platform. Hidden Talents: Unveil your creative side—be it dancing, singing, rapping, poetry, or comedy. Let your talent shine!
Got That Special Spark? A Story That Demands to Be Heard? Your moment is now!
Sign up to Showcase Your Brilliance: https://aka.ms/MPPCGotPowerSignUp
Deadline for submissions: Thursday, Sept 28th
How It Works:
Submit this form to sign up: https://aka.ms/MPPCGotPowerSignUp We’ll contact you if you’re selected. Get ready to be onstage!
The Spotlight is Yours: Each participant has 3-5 minutes to shine, with insightful commentary from our panel of judges. We’re not just giving you a stage; we’re handing you the platform to make your mark.
Be the Story We Tell: Your talents and narratives will not just entertain but inspire, serving as the bedrock for our community’s future stories and successes.
Celebration, Surprises, and Connections: As the curtain falls, the excitement continues! Await surprise awards and seize the chance to mingle with industry experts, Microsoft Power Platform leaders, and community luminaries. It’s not just a show; it’s an opportunity to forge connections and celebrate shared successes.
Event Details:
Date and Time: Wed Oct 4th, 6:30-9:00PM
Location: MPPC23 at the MGM Grand, Las Vegas, NV, USA
September User Group Success Story: Reading Dynamics 365 & Power Platform User Group
The Reading Dynamics 365 and Power Platform User Group is a community-driven initiative that started in September 2022. It has quickly earned recognition for its enthusiastic leadership and resilience in the face of challenges. With a focus on promoting learning and networking among professionals in the Dynamics 365 and Power Platform ecosystem, the group has grown steadily and gained a reputation for its commitment to its members!
The group, which had its inaugural event in January 2023 at the Microsoft UK Headquarters in Reading, has since organized three successful gatherings, including a recent social lunch. They maintain a regular schedule of four events per year, each attended by an average of 20-25 enthusiastic participants who enjoy engaging talks and, of course, pizza.
The Reading User Group’s presence is primarily spread through LinkedIn and Meetup, with the support of the wider community. This thriving community is managed by a dedicated team consisting of Fraser Dear, Tim Leung, and Andrew Bibby, who serves as the main point of contact for the UK Dynamics 365 and Power Platform User Groups.
Andrew Bibby, an active figure in the Dynamics 365 and Power Platform community, nominated this group due to his admiration for the Reading UK User Group’s efforts. He emphasized their remarkable enthusiasm and success in running the group, noting that they navigated challenges such as finding venues with resilience and smiles on their faces. Despite being a relatively new group with 20-30 members, they have managed to achieve high attendance at their meetings.
The group’s journey began when Fraser Dear moved to the Reading area and realized the absence of a user group catering to professionals in the Dynamics 365 and Power Platform space. He reached out to Andrew, who provided valuable guidance and support, allowing the Reading User Group to officially join the UK Dynamics 365 and Power Platform User Groups community.
One of the group’s notable achievements was overcoming the challenge of finding a suitable venue. Initially, their «home» was the Microsoft UK HQ in Reading. However, due to office closures, they had to seek a new location with limited time. Fortunately, a connection with Stephanie Stacey from Microsoft led them to Reading College and its Institute of Technology. The college generously offered them event space and support, forging a mutually beneficial partnership where the group promotes the Institute and encourages its members to support the next generation of IT professionals.
With the dedication of its leadership team, the Reading Dynamics 365 and Power Platform User Group is poised to continue growing and thriving! Their story exemplifies the power of community-driven initiatives and the positive impact they can have on professional development and networking in the tech industry. As they move forward with their upcoming events and collaborations with Reading College, the group is likely to remain a valuable resource for professionals in the Reading area and beyond.
A Celebration of What We’ve Achieved—And Announcing Our Winners
As the sun sets on the #SummerofSolutions Challenge, it’s time to reflect and celebrate! The journey we embarked upon together was not just about providing answers – it was about fostering a sense of community, encouraging collaboration, and unlocking the true potential of the Power Platform tools.
From the initial announcement to the final week’s push, the Summer of Solutions Challenge has been a whirlwind of engagement and growth. It was a call to action for every member of our Power Platform community, urging them to contribute their expertise, engage in discussions, and elevate collective knowledge across the community as part of the low-code revolution.
Reflecting on the Impact
As the challenge ends, it’s essential to reflect on the impact it’s had across our Power Platform communities:
Community Resilience: The challenge demonstrated the resilience of our community. Despite geographical distances and diverse backgrounds, we came together to contribute, learn, and collaborate. This resilience is the cornerstone of our collective strength.Diverse Expertise: The solutions shared during the challenge underscore the incredible expertise within our community. From intricate technical insights to creative problem-solving, our members showcased their diverse skill sets, enhancing our community’s depth.Shared Learning: Solutions spurred shared learning. They provided opportunities for members to grasp new concepts, expand their horizons, and uncover the Power Platform tools’ untapped potential. This learning ripple effect will continue to shape our growth.
Empowerment: Solutions empowered community members. They validated their knowledge, boosted their confidence, and highlighted their contributions. Each solution shared was a step towards personal and communal empowerment.
We are proud and thankful as we conclude the Summer of Solutions Challenge. The challenge showed the potential of teamwork, the benefit of knowledge-sharing, and the resilience of our Power Platform community. The solutions offered by each member are more than just answers; they are the expression of our shared commitment to innovation, growth, and progress!
Drum roll, Please…
And now, without further ado, it’s time to announce the winners who have risen above the rest in the Summer of Solutions Challenge!
These are the top community users and Super Users who have not only earned recognition but have become beacons of inspiration for us all.
Power Apps Community:
Community User Winner: @SpongYe Super User Winner: Pending Acceptance
Power Automate Community:
Community User Winner: @trice602 Super User Winner: @Expiscornovus
Power Virtual Agents Community:
Community User Winner: Pending AcceptanceSuper User: Pending Acceptance
Power Pages Community:
Community User Winner: @OOlashyn Super User Winner: @ChristianAbata
We are also pleased to announced two additional tickets that we are awarding to the Overall Top Solution providers in the following communities:
Power Apps: @LaurensM
Power Automate: @ManishSolanki
Thank you for making this challenge a resounding success. Your participation has reaffirmed the strength of our community and the boundless potential that lies within each of us. Let’s keep the spirit of collaboration alive as we continue on this incredible journey in Power Platform together.Winners, we will see you in Vegas! Every other amazing solutions superstar, we will see you in the Community!Congratulations, everyone!
September Featured User Group Leader
Ayonija Shatakshi, a seasoned senior consultant at Improving, Ohio, is a passionate advocate for M365, SharePoint, Power Platform, and Azure, recognizing how they synergize to deliver top-notch solutions. Recently, we asked Ayonija to share her journey as a user group leader, shedding light on her motivations and the benefits she’s reaped from her community involvement.
Ayonija embarked on her role as a user group leader in December 2022, driven by a desire to explore how the community leveraged various Power Platform components. When she couldn’t find a suitable local group, she decided to create one herself!
Speaking about the impact of the community on her professional and personal growth, Ayonija says, «It’s fascinating to witness how everyone navigates the world of Power Platform, dealing with license constraints and keeping up with new features. There’s so much to learn from their experiences.
Her favorite aspect of being a user group leader is the opportunity to network and engage in face-to-face discussions with fellow enthusiasts, fostering deeper connections within the community. Offering advice to budding user group leaders, Ayonija emphasized the importance of communication and consistency, two pillars that sustain any successful community initiative.
When asked why she encourages others to become user group leaders, Ayonija said, «Being part of a user group is one of the best ways to connect with experienced professionals in the same field and glean knowledge from them. If there isn’t a local group, consider starting one; you’ll soon find like-minded individuals.»
Her highlight from the past year as a user group leader was witnessing consistent growth within the group, a testament to the thriving community she has nurtured. Advocating for user group participation, Ayonija stated, «It’s the fastest route to learning from the community, gaining insights, and staying updated on industry trends.»
Check out her group: Cleveland Power Platform User Group
Get coding assistance with Copilot while editing site code in Visual Studio Code desktop
We are excited to announce a new preview feature: Copilot in Power Pages for Visual Studio Code desktop. This feature provides you with coding assistance while you edit your site code in Visual Studio Code desktop using natural language chat interaction. You can use Copilot in Power Pages to describe your expected code behavior and get AI-generated code snippets that you can refine and use for various aspects of your site development.
Note: To use this feature, you need to sign into your environment, and it is only available in the US region in English language.
Feature capabilities
With Copilot, you can get coding assistance for:
Form and List customization: allow custom validation for forms and add interactive experience to form and list using JavaScript.Webpage customizations: generate HTML components and add styles to your pages.Web Template: generate HTML templates.Liquid: generate liquid code to add dynamic content in Webpages or Web Templates.FetchXML: Get help with writing FetchXML to query data from Dataverse.Web API: Generate code for Power Pages Web APIs to Create/Read/Update/Delete Dataverse records.Content Snippets: Get help with writing reusable content blocks across multiple pages.Provide feedback:Use feedback option to share your input and suggestions.
1. Form and List customization
Form and List customization is a feature that allows you to customize the appearance and behavior of your forms and lists on your site pages. You can use Form and List customization to change the layout, style, validation, and actions of your Forms and Lists. With Copilot, you can chat with the AI assistant and get code snippets for adding custom validation and interactivity to your Forms and Lists in your site code.
Sample prompt for form validation
Generate JavaScript code for form field validation to ensure age is greater than 18.
Sample prompt for list customization
Write JavaScript code to highlight the row where loan status is approved in table list.
To learn more about Form and List customization, visit form link and list link.
2. Webpage customizations
Webpage customizations is a feature that allows you to customize various aspects of your webpages such as HTML components, styles, and more. You can use Webpage customizations to enhance the look and feel of your site pages. With Copilot, you can chat with the AI assistant and get code snippets for generating HTML components and adding styles to your pages in your site code.
Sample prompt
Write HTML code for the webpage to show loan registration form FAQ as a list group.
To learn more about Webpage customizations, visit this link.
3. Web Template
Web Template is a feature that allows you to create HTML templates for your site pages. You can use Web Template to define the layout, style, and content of your pages. With Copilot, you can chat with the AI assistant and get code snippets for creating and using Web Templates in your site code.
Sample prompt
Create a web template with breadcrumb and page title.
To learn more about Web Template, visit this link.
4. Liquid
Liquid is a feature that allows you to add dynamic content to your Webpages or Web Templates. You can use Liquid to access data from Dataverse or other sources and display it on your pages. With Copilot, you can chat with the AI assistant and get code snippets for writing Liquid expressions in your site code.
Sample prompt
Generate liquid code to check if user has admin role.
To learn more about Liquid, visit this link.
5. FetchXML
FetchXML is a feature that allows you to query data from Dataverse using XML syntax. You can use FetchXML to filter, sort, aggregate, or join data from different entities. With Copilot, you can chat with the AI assistant and get code snippets for writing FetchXML queries in your site code.
Sample prompt
Generate a fetchxml liquid query to retrieve the list of contacts who are having credit score more than 500 and are active.
To learn more about FetchXML, visit this link.
6. Web API
Web API is a feature that allows you to interact with Dataverse records using HTTP requests. You can use Web API to create, read, update, or delete records from different entities. With Copilot, you can chat with the AI assistant and get code snippets for writing Web API requests in your site code.
Sample prompt
Generate Web API code to query active contact records.
To learn more about Web API, visit this link.
7. Content Snippets
Content Snippets is a feature that allows you to write reusable content blocks that can be used across multiple pages. You can use Content Snippets to store common HTML, CSS, or JavaScript code that you want to reuse on different pages. With Copilot, you can chat with the AI assistant and get code snippets for creating and using Content Snippets in your site code.
Sample prompt
Generate content snippets to display copyright, current date and «All rights reserved.» message.
To learn more about Content Snippets, visit this link.
8. Provide feedback
In every response of the Copilot chat, select the feedback options, a thumb up () if you like the response or thumb down () if you didn’t like it. Your feedback greatly helps improve the capabilities of this feature.
How to use Copilot
Install Power Platform Extension: Ensure you have the Power Platform Tools extension (version 2.0.3 or higher) installed within Visual Studio Code .Access Copilot: Download and open your Power Pages site root folder in Visual Studio Code and activate the Copilot feature from left navigation by selecting “Power Platform”.Engage in Natural Language Interaction: Describe the expected behavior of your code using natural language. Copilot will generate code snippets based on your descriptions.Insert or copy AI generated code to your site: If you are happy with the generated code, you can easily copy and paste the code snippet or insert the code to Power Pages site.Refine and Implement: Review the AI-generated code snippets, refining them as needed to match your exact requirements.Provide feedback: Select the feedback options, a thumb up () if you like the response or thumb down () if you didn’t like it and provide your feedback.
We are looking forward to your feedback
Copilot in Power Pages is designed to streamline your coding journey and amplify your creativity. Your feedback is crucial in shaping the future of this feature. We want to hear from you!
See documentation here for a detailed overview.
Full product blog here: Get coding assistance with Copilot while editing site code in Visual Studio Code desktop| Microsoft Power Page
Thank you,
Neeraj Nandwana
New White Paper Released: Application Modernization with Power Platform
Check out the latest white paper by Robert Standefer and David Yack that explores the benefits, strategies, and best practices of modernizing applications with Power Platform.This great free download provides insights and guidance on how the Microsoft low-code platform can help you ensure the success of your application modernization efforts as part of your organization’s digital transformation. Click the link below to find out more!Application Modernization with Power Platform
Just like any other language, Power Query has its own different types of errors, one of them is DataFormat Error.
Dataformat errors in Power Query are mostly data type errors and do not prevent you from loading data to Power BI, instead the cells will be loaded as blank. The screenshot below shows 3 errors for 78 records when the data is loaded to Power BI.
To audit the error or get more details, do the following:
- Click on View errors from above to go back to Power Query Editor
- In Power Query Editor-> Select View tab -> Check Column Quality
For this example, UnitsInStock has 3% error for all rows in that column.
3. Click on Kept Errors under Applied Steps to see only rows with errors, the Kept Errors step is automatically added when you click on View errors from step 1.
Below screenshot show 100% error for the 3 rows.
4. To see details of the error, select the error as seeing below:
For this example, the error occurs because the column data type is Number, but 3 rows in the column has Text values, Power Query return error because it cannot convert the Text values to Numbers.
DataFormat.Error: We couldn’t convert to Number
5. To audit the error, create a custom column using the try expression, from Add column -> Custom Column -> type the expression below. A new Record column will be created.
6. Click on Expand -> Select Error
7. Click Expand again -> Click OK
You will see the Reason, Message and Detail of the error. You can load the error details to Power BI and create an Audit report if needed.
Also, you can use this report to make changes to the affected values at Data source level and reload to Power BI.
8. To replace the errors in Power Query from Advanced Editor, add a line of code to the MQuery with the value to replace with.
For this example, I am replacing all errors with 0. Optionally, you can replace the errors by right clicking the column, then select Replace Error.
Note: Those new values from Power Query will not be updated to your source data.
9. Click on Enable Load to load the data to Power BI if its not enabled by default, right click on the query from the left and select Enable load.
10. Click Close and Apply
The data will now load and apply all changes successfully without errors.
Happy Auditing! 🙂
Xat Пользователь Сообщений: 169 |
#1 15.10.2019 16:02:07 Приветствую! Сделал слияние таблиц по одному столбцу, в Power Query. При подключении сводной таблицы к данному запросу выдает ошибку:
Сохранил в запросе строки ошибок получил следующие:
Проверил исходники, на наличие символов, ничего не обнаружил. Сводная успешно подключается к запросом по отдельности, но при слиянии начинает выдавать ошибку. Пробовал заменить «пустоту» на «-«, результатов не дало, ошибка осталась прежней.
Исходный файл, много весит, не могу загрузить( Пробовал хоть как то изобразить в файле примере, но ошибку не выдает. Изменено: Xat — 15.10.2019 16:08:04 |
|||||
Dark1589 Пользователь Сообщений: 487 |
Xat, где-то текст попал в числовой столбец. Сам запрос получается выгрузить на лист? |
Xat Пользователь Сообщений: 169 |
Dark1589, Нет, тоже ругается. При слиянии, я разворачиваю только два текстовых столбца.( без столбца артикул) По факту числовых столбцов не прибавляется Изменено: Xat — 15.10.2019 16:11:45 |
Xat, запрос ругается на формат данных, говорит, не удалось преобразовать в число, почему бы не дать ему, что он хочет? |
|
Dark1589 Пользователь Сообщений: 487 |
Xat, в запросе слияния попробуйте убрать шаг определения типа данных и покопайтесь в фильтре. Возможно косячное значение будет как раз внизу или вверху списка в одном из столбцов |
Xat Пользователь Сообщений: 169 |
Dark1589,Тип данных не меняет(шаг отсутствует). В фильтре , в самом низу , где обычно загрузить еще данные, светится эта же ошибка(( Изменено: Xat — 15.10.2019 16:25:55 |
PooHkrd Пользователь Сообщений: 6602 Excel x64 О365 / 2016 / Online / Power BI |
#7 15.10.2019 16:26:31
Это значит у вас имеются столбцы с числами, и одновременно пустыми ячейками, но ячейки эти не совсем пустые, а в них имеется так называемый нулевой текст, в Экселе это выглядит как =»». Перед присвоением типов столбцам такие пустые значения нужно заменить на null кодом типа такого:
меняет во всех столбцах нулевой текст на null
Вот горшок пустой, он предмет простой… |
|||||
Xat Пользователь Сообщений: 169 |
#8 15.10.2019 17:00:38 Aleksei_Zhigulin, PooHkrd, Выделил все столбцы , и заменил пустоту на «null», результатов не дало((
Он выгружает частично , 15(всего их намного больше) строк , я проверил в запросе что после этих строк в запросе , ничего подозрительного не увидел Изменено: Xat — 15.10.2019 17:03:38 |
||
Dark1589 Пользователь Сообщений: 487 |
Xat, у вас в итоге 3 столбца получается? Артикул (числовой) и 2 текстовых? |
Xat Пользователь Сообщений: 169 |
#10 15.10.2019 17:10:31 Dark1 589, Получается, старый столбец артикул(столбец в исх таблице) остается, подгружаются два текстовых ( два крайних правых) Всего 14.
Изменено: Xat — 15.10.2019 17:11:39 |
|
Dark1589 Пользователь Сообщений: 487 |
Xat, картинка не грузится. Формат столбца артикул в исходном запросе числовой? Если да, то попробуйте поменять на текст (в т.ч. в исходных запросах). Возможно какой-то артикул 532623-Б (например) и вызывает ошибку |
PooHkrd Пользователь Сообщений: 6602 Excel x64 О365 / 2016 / Online / Power BI |
Xat, не можете показать данные, покажите хотя бы коды всех запросов, которые используются в книге. Вот горшок пустой, он предмет простой… |
Xat Пользователь Сообщений: 169 |
#13 17.10.2019 11:24:17 Dark1589, PooHkrd,Большое спасибо)Теперь буду знать как проверять запросы, хоть сводная и не ругалась при подключении по отдельности, там были ошибки. Нашел в чем была ошибка, действительно в столбце «арт» попал текст, но я пытался исправить это в последнем шаге » изменить тип» , а надо было в самом первом. Так как с самого начало там где был текст в столбце, тянулась «error», и соответственно ни как не исправлялась в нужный арт. Изменено: Xat — 17.10.2019 11:24:38 |
Have you ever been working with a new Power BI Dataset and received a DataFormat.Error notification while working with your data model? It can be very frustrating and confusing, but we will walk through a few ways you can address the Power BI error and avoid it in the future.
It’s worth noting that this error can show up in both the Microsoft Excel and Microsoft Power BI. Both pieces of software use Power Query to import and prepare data for further processing.
In this example, we will use Power BI, but the steps to correct will be similar in Excel.
What Causes a Power Query DataFomat Error?
DateFormat errors occur when a failure occurs when converting data types. Data types are important in Power Query because the software needs to know how to interact with software. For Example, Power Query will add two numbers and produce the sum but when asked to add two pieces of text it will concatenate them together into a longer string.
The computer would be unable to calculate the sum of the number 15 + the text “Apples” and causes an error message.
Step 1.) Right Click the Table Name and Edit Query
The first step is to launch the Power BI Query Editor. You can do this either from the Report View or Data View selected on the left side of the screen, and right click the table name you are importing and click on Edit Query.
Step 2.) Identify the Applied Step Causing Error
The Applied Steps panel on the right side of the screen will show each data transformation step that happens when the data is being loaded into Power BI. Most often this will be the Changed Type Step.
The current column data type is noted at the top of the column with a small icon of numbers, a calendar, letters etc. You can also right click on the column and go to Change Type, it will show you the selected data type for that column.
Note: Another option for quickly identifying the assigned data type, and the step that it’s occurring is by using the Advanced Editor, available under the View tab. It will show you the Power Query Formula Language, also called “M”.
Step 3.) Fix a DataFormat Error by Changing Data Type
To correct the error, you need to assign the correct data type to the column.
You can do this by right clicking on the column name, select Change Type and select the appropriate data type. In our Example, we will change the data type of the Sales Qty column to Whole Number.
Correcting DataFormat Error by using Replace Error
A second option is to Right Click on the Column Name, and click on Replace Error.
The screen will allow you to do a “Find and Replace All” for a specific value within the dataset. For this method to work, you would need all of the errors to be caused by a similar set of values.
If it is a handful of values, you can click on an individual error and view the value that is causing the error. The example below shows that the Sales Qty column has a numeric data type, but one cell has the word “Zero” in it causing the error. You could use Replace Error to change “Zero” to 0
Identify Errors Using Power BI Column Quality Preview
Microsoft Power BI has several capabilities to perform data analysis and to preview the data brought into your data model. You can turn on Column Quality under the View section of the Power BI Toolbar.
Column Quality will show you how many errors you have in each column. If you’re unable to change the data type in your column, you can right click on the Column Quality preview Remove or Replace errors from here.
You can click on Keep Errors to filter the view to a list of all errors within the column.
Using Chat GPT to Reconcile Errors and Write Formulas
Chat GPT is a Natural Language Processing chat bot developed by OpenAI. It’s been trained to understand and respond to requests in many different languages. It’s an incredibly valuable resource for asking questions about Power BI, whether you’re trying to better understand the meaning of an error or write a custom DAX Formula.
You can learn more about how to sign up and use this free tool here: How to Use Chat GPT with Power BI
Pop! Automation Power BI Consulting and Development Services
If you need a helping hand from professional Power BI consultants and developers contact us today. We have experience in a range of Power BI use cases and can help you get your project off to a quick start. Along with development, we also offer training courses to get your team up to speed and empower them with the ability to manage dashboards and reports that we develop or create their own professional reports using industry best practicies.