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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Rsanjuan
Advocate III
Advocate III

Calculating a row that shows difference instead of total

Is there a way to calculate the difference (variance) instead of total between two rows?

 

Capture1.JPG

 

 

Thanks!

1 ACCEPTED SOLUTION
v-sihou-msft
Microsoft Employee
Microsoft Employee

@Rsanjuan

 

No, the grand total row is the aggregation for all rows, it's not possible to make the grand total row to calcualte the variance between two specific rows in table/matrix. 

 

In this scenario, I suggest you create a previous year measure with PREVIOUSYEAR() like:

 

 

=
CALCULATE ( SUM ( Table[Sales] ), PREVIOUSYEAR ( Calendar[Date] ) )

 

And this measure can only appear like "column" in your visual for comparison.

 

Regards,

View solution in original post

1 REPLY 1
v-sihou-msft
Microsoft Employee
Microsoft Employee

@Rsanjuan

 

No, the grand total row is the aggregation for all rows, it's not possible to make the grand total row to calcualte the variance between two specific rows in table/matrix. 

 

In this scenario, I suggest you create a previous year measure with PREVIOUSYEAR() like:

 

 

=
CALCULATE ( SUM ( Table[Sales] ), PREVIOUSYEAR ( Calendar[Date] ) )

 

And this measure can only appear like "column" in your visual for comparison.

 

Regards,

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors