Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I will transform invoice data inside powerBI to then analyze this. The invoices have several sections to show where the sums in the total amount come from. When I try to retrieve the invoice data, powerBI only manages to retrieve the bottom line with the KID number, but not the total amount or the various subtotals. My idea was to use python to clean up the invoice and create a format that powerBI can read, so that all the data comes with it. But here I need your help, how do I do this? Since I am a summer student in a company, I have limited access and am unable to connect vscode to powerBI. How should I transform the documents?
Solved! Go to Solution.
Hi @Anonymous ,
You can perform data cleansing and perform advanced data shaping and analysis on a dataset using Python directly from within the Power Query editor in Power BI Desktop.
For example:
import pandas as pd
completedData = dataset.fillna(method='backfill', inplace=False)
dataset["completedValues"] = completedData["SMI missing values"]
You can find the procedure and related restrictions in the official documentation below, hopefully it will help you:
Use Python in Power BI Power Query Editor - Power BI | Microsoft Learn
This is the related document, you can view this content:
powerbi - Power BI: How to process/clean string data using Python? - Stack Overflow
random - How to make a reproducible data sample in PowerBI using Python? - Stack Overflow
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You can perform data cleansing and perform advanced data shaping and analysis on a dataset using Python directly from within the Power Query editor in Power BI Desktop.
For example:
import pandas as pd
completedData = dataset.fillna(method='backfill', inplace=False)
dataset["completedValues"] = completedData["SMI missing values"]
You can find the procedure and related restrictions in the official documentation below, hopefully it will help you:
Use Python in Power BI Power Query Editor - Power BI | Microsoft Learn
This is the related document, you can view this content:
powerbi - Power BI: How to process/clean string data using Python? - Stack Overflow
random - How to make a reproducible data sample in PowerBI using Python? - Stack Overflow
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
8 | |
7 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |