Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
lsihui_
Frequent Visitor

Presenting differences/variances in one table

Hi all, 

 

Have been trying to create a difference/variance on a matrix. The dataset consists of some years with two waves of data (e.g., Wave 1 & 2 of 2019), while others only have one wave (e.g., 2020, 2021). The difference calculation starts to get wrong when I tried to calculate a year with only one wave and one specific wave from another year. Also, I only want to show the difference in the final PBI report.

 

Here is the link to my sample PBI report:  Presenting differences table on PBI.pbix

Kindly advise how I can revise my calculated measure. Thank you!

3 REPLIES 3
rajendraongole1
Super User
Super User

Hi @lsihui_  - Please find the attached pbix with output. check it and let me know.

 

 

rajendraongole1_0-1741687294157.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi @rajendraongole1 , 

 

I am still seeing the value after using your new measure: Property A should be -121 and Property B should be +66 instead. 

lsihui__0-1741767862421.png

 

Can you try with difference measure:

 

Difference =
VAR Wave1 = CALCULATE(SUM('Table'[Value]), 'Table'[Wave] = "Wave 1")
VAR Wave2 = CALCULATE(SUM('Table'[Value]), 'Table'[Wave] = "Wave 2")

RETURN
IF(NOT(ISBLANK(Wave1)) && NOT(ISBLANK(Wave2)), Wave2 - Wave1, BLANK())

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.