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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Force Grand total and Subtotal in matrix

Hi,

 

I've this sample data, and i want to "force" the result of grand total and subtotal.

Example:

 

The expected result would be this:

 

Screenshot_1.jpg

 

But the result that i want is this (sample data):

 

Screenshot_2.jpg

 

Basically I want to be able to set the values manually.

Thanks.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @v-xicai ,

 

I figured it out a solution with the help of this link.

https://powerpivotpro.com/2012/03/subtotals-and-grand-totals-that-add-up-correctly/

 

I create another measure with my final goal and called KPI Increased (for other scenario):

 

 

KPI = IF( COUNTROWS( VALUES( 'Table'[SUB_CAT] )) = 1 ; AVERAGE('Table'[KPI]) ; 
IF( COUNTROWS( VALUES( 'Table'[CAT] )) = 16 ; 0,058 ; AVERAGEX(VALUES('Table'[SUB_CAT]); AVERAGE( 'Table'[KPI Increased] ) ) ))

1st line: result for rows (the same as KPI)

 

2nd line: I choose "16" because my grand total have 16 sub-categories

3rd line: my subtotals changed with my increased values.

 

Thanks!

 

View solution in original post

4 REPLIES 4
AlB
Super User
Super User

Hi @Anonymous 

You would have to explain a bit more the structure of your tables and the fields you are using on the visual for an accurate answwer. Try a measure using ISFILTERED and/or ISCROSSFILTERED to detect where you are on the visual and set the result accordingly

Anonymous
Not applicable

Hi @AlB 

 

The goal is to have a simple table with the fixed data. I don't want the data to change, it's a kind of "budget". The subtotals and grand totals are different for teams to focus on their goal (colors) rather than the overall goal (subtotal / grand total).

Hi @Anonymous ,

 

Your demand is a good idea, while it is not supported to implement in Power BI currently. You can post your new idea here https://ideas.powerbi.com/forums/265200-power-bi-ideas , to improve the Power BI.

 

It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

You may create goal column , then use KPI visual to display difference between actual and goal values.

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @v-xicai ,

 

I figured it out a solution with the help of this link.

https://powerpivotpro.com/2012/03/subtotals-and-grand-totals-that-add-up-correctly/

 

I create another measure with my final goal and called KPI Increased (for other scenario):

 

 

KPI = IF( COUNTROWS( VALUES( 'Table'[SUB_CAT] )) = 1 ; AVERAGE('Table'[KPI]) ; 
IF( COUNTROWS( VALUES( 'Table'[CAT] )) = 16 ; 0,058 ; AVERAGEX(VALUES('Table'[SUB_CAT]); AVERAGE( 'Table'[KPI Increased] ) ) ))

1st line: result for rows (the same as KPI)

 

2nd line: I choose "16" because my grand total have 16 sub-categories

3rd line: my subtotals changed with my increased values.

 

Thanks!

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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