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
Hi,
I would need advice.
How to fix to get -3.27%? I don't want to count empty cells.
Thank you
Ondřej
Solved! Go to Solution.
Hi @Fidzi8 ,
Create a measure as below:
_Measure =
var _diff=DIVIDE(CALCULATE(SUM('Table (2)'[Cost/tn 21])-SUM('Table (2)'[Cost/tn 20]),FILTER('Table (2)','Table (2)'[Category]=MAX('Table (2)'[Category]))),SUM('Table (2)'[Cost/tn 20]))
var _totalfor21=CALCULATE(SUM('Table (2)'[Cost/tn 21]),NOT(ISBLANK('Table (2)'[Cost/tn 20])),ALL('Table (2)'))
var _totalfor20=CALCULATE(SUM('Table (2)'[Cost/tn 20]),NOT(ISBLANK('Table (2)'[Cost/tn 21])),ALL('Table (2)'))
Return
IF(ISINSCOPE('Table (2)'[Category]),_diff,DIVIDE(_totalfor21-_totalfor20,_totalfor20))
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi @Fidzi8 ,
Create a measure as below:
_Measure =
var _diff=DIVIDE(CALCULATE(SUM('Table (2)'[Cost/tn 21])-SUM('Table (2)'[Cost/tn 20]),FILTER('Table (2)','Table (2)'[Category]=MAX('Table (2)'[Category]))),SUM('Table (2)'[Cost/tn 20]))
var _totalfor21=CALCULATE(SUM('Table (2)'[Cost/tn 21]),NOT(ISBLANK('Table (2)'[Cost/tn 20])),ALL('Table (2)'))
var _totalfor20=CALCULATE(SUM('Table (2)'[Cost/tn 20]),NOT(ISBLANK('Table (2)'[Cost/tn 21])),ALL('Table (2)'))
Return
IF(ISINSCOPE('Table (2)'[Category]),_diff,DIVIDE(_totalfor21-_totalfor20,_totalfor20))
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |