Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Is it possible - and if so, how - to remove payments with a sum of balance =0 with a power query?
It's a heavy data set and it needs to be cleaned up BEFORE working with the data for graphs etc. I thought it would be best to filter as much as possible in the power query to reduce calculation time in the dashboard.
So this is a simplification of the data set:
Timm aug 300
Lenard aug 300
Lenard aug -300
James aug 300
James sep 500
James aug -300
This creates major problems for me: the number of people paid this year is 3, though in reality 2 (not Lenard), and in august it's only 1 instead of 3. The average cost per person or per month becomes a mess now. Keep in mind this is a simplification, and we are going to need a lot of visuals and calculations depending on age, company, starting date, ending date, region, etc, etc, and all those mixed as well.
Any ideas?
I was thinking about a duplicate table, then pivot to total sum per person/per month, then generate some kind of key column to link the original table with the pivot table, and then remove the sum=0 data.
Is there a better way? And is this even possible?
Thanks in advance, I hope it makes some sense.
Solved! Go to Solution.
New Measure =
var _sum= sum(Table[Amount]), Allexcept(Table, Table[Name], Table[Month]) )
return
calculate(Sum(Table[Amount]), filter(Table, _sum<> 0))
New Measure =
var _sum= sum(Table[Amount]), Allexcept(Table, Table[Name], Table[Month]) )
return
calculate(Sum(Table[Amount]), filter(Table, _sum<> 0))
Thanks for your help! Finally got time to look at it, but don't get it to work.
There is a closing bracket too many in the first row.
Also, the first comma gives an 'Unexpected expression' error message. Tried semicolons instead of comma's, but the result was the same. Just to be clear, this is my dax:
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 74 | |
| 50 | |
| 47 | |
| 44 |