Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 7 | |
| 4 | |
| 4 | |
| 4 | |
| 4 |