subtotals not working with 3 in One measure

djemy1975

Board Regular
Joined
Jan 18, 2016
Messages
51
Hi colleagues,

I have a combined measure made of 3 measures :PR, PO ,Spending. This measure is called All measures I put a slicer to filter by Measure on matrix visual .all is working ,but subtotals do not give the correct subtotals .is there any workaround to solve this problem?
Screenshot 2021-03-13-2.png
Screenshot 2021-03-13 -3.png
Screenshot 2021-03-13 .png

Thanks in advance,
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
What is your formula for Selected measure? Max() something? If so, that is why you are getting spending. There are various ways to fix it. You could change selected measure to SELECTEDVALUE() and the use an IF

IF(isblank([selected measure]),[spend] + [po] + [pr],what you have already goes here)
 
Upvote 0
What is your formula for Selected measure? Max() something? If so, that is why you are getting spending. There are various ways to fix it. You could change selected measure to SELECTEDVALUE() and the use an IF

IF(isblank([selected measure]),[spend] + [po] + [pr],what you have already goes here)
First , I want to thank you for your reply;

My formula for selected measure is:
Selected Measure = SELECTEDVALUE('Measure Selection'[Order];1)
I have a table of measures called :"Measure Selection" ,with two columns :"Measure Name" and "Order" , from which I select the measure name using Slicer

"Measure Name" column: "Order" Column:
Spending KDZD 1
PO 2
PR 3

I think the problem is in the '[Order];1)

Best regards,
 
Upvote 0
Your measure
Selected Measure = SELECTEDVALUE('Measure Selection'[Order];1)

Is hardcoding the value 1 in the case that there is more than 1 value available.
When you are in the Total, there is more than 1 value available - by definition.
So you have hard coded your total to be [Spending].
Change your measure to this

Selected Measure = SELECTEDVALUE('Measure Selection'[Order];[spend] + [po] + [pr])
You need to add the correct names of the measures
 
Upvote 0
Solution
Your measure
Selected Measure = SELECTEDVALUE('Measure Selection'[Order];1)

Is hardcoding the value 1 in the case that there is more than 1 value available.
When you are in the Total, there is more than 1 value available - by definition.
So you have hard coded your total to be [Spending].
Change your measure to this

Selected Measure = SELECTEDVALUE('Measure Selection'[Order];[spend] + [po] + [pr])
You need to add the correct names of the measures
Thank you so much .I adjusted the formula as you suggested and it is ok
Working.png


Mark thread as SOLVED
 
Upvote 0

Forum statistics

Threads
1,223,723
Messages
6,174,123
Members
452,546
Latest member
Rafafa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top