Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.