cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rsanjuan
Helper IV
Helper IV

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
Microsoft

@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
Microsoft

@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

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors