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,
I have got a table with Sales LY and this year sales looking like:
Month Sales LY Sales TY DIF
Jan 100 150 50
Feb 150 130 -20
Mar 200 50 -150
Apr 100
Total 550 330 -220
I have made the "DIF" column only calculate the difference when Sales TY is not blank. However, the total row calculates the total difference of all the rows, including those with blank Sales TY.
How can I only show the total for the "visible" values in the table? So, the above table should look like:
Month Sales LY Sales TY DIF
Jan 100 150 50
Feb 150 130 -20
Mar 200 50 -150
Apr 100
Total 550 330 -120
Hope you can help 🙂
HI @Anonymous ,
You can create 2 measures
Difference =
IF(MAX('Table'[Sales TY]) = BLANK(), BLANK() ,SUM('Table'[Sales LY]) - SUM('Table'[Sales TY]))
DIF = SUMX('Table',[Difference])
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
@Anonymous , assuming these are measures [Sales TY] , [Sales LY]
New measures like this should work
if(isblank([Sales TY]), blank(), [Sales TY] -[Sales LY])
Thank you @amitchandak
However, they are not measures...
Maybe its easier if i somehow make them into a measure?
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 |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 12 | |
| 11 | |
| 10 |