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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
xkoby001
Frequent Visitor

Incorrect Subtotal and Grand total value of measure (division)

Hello and thank you all, who helped me with other issues (I have never posted here before, but I found so many solutions for my tasks)!

 

Info:

here is a data model

dm.PNG

 

 

 

 

 

 

 

 

 

Pivot table of my report looks like this

pt.PNG

 

 

 

 

 

 

 

 

 

 

Problem:

there are two measures (divide_TEST and total_divide_TEST which contains the first one),

divide_TEST:=DIVIDE(
CALCULATE(
	SUM(DATA[value_bgly]);DATA[index]="Gross revenue");
CALCULATE(
	SUM(DATA[value_bgly]);DATA[index]="Volume (bottles)");
	0)
total_divide_TEST:=IF(
HASONEVALUE(DATA[name_reporting]);
[divide_TEST];
SUMX(SUMMARIZE(
DATA;
DATA[name_reporting];
DATA[sales_area];
"__TOTAL__";[divide_TEST]);[__TOTAL__])
)

but neither one do not works as I need → Subtotal and Grand total are not the sum of rows.

 

But, when I'll rotate my PT, somethings gonna work partially:pt2.PNG

1st measure shows Subtotal and Grand total everywhere, but the wrong one unlike the 2nd measure, which shows Subtotal and Grand total only in "Gross revenue" and "Totals" section. And even only section "Totals" shows the correct evaluation of Subtotal and Grand total of 2nd measure. I've spent a lot of time to solve summarization of division in row line, but I've no deeper knowledges and skills to work with hierarchy, and I think the problem is in it.

 

Help me please to resolve this task! (file)

J=D

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

Hi @xkoby001 

You may create below measures to get correct total for measure [divide_TEST] and [total_divide_TEST].You may turn off the column subtotals.

Reference:https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/td-p/547907

Measure = SUMX(VALUES(DATA[name_reporting]),[divide_TEST])
Measure 2 = SUMX(VALUES(DATA[name_reporting]),[total_divide_TEST])

1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @xkoby001 

You may create below measures to get correct total for measure [divide_TEST] and [total_divide_TEST].You may turn off the column subtotals.

Reference:https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/td-p/547907

Measure = SUMX(VALUES(DATA[name_reporting]),[divide_TEST])
Measure 2 = SUMX(VALUES(DATA[name_reporting]),[total_divide_TEST])

1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hiiiiii @v-cherch-msft !!!!!

Thank you so mucchhhhh!

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors