Forum Discussion
Incorrect grand Total
SUMX(
SUMMARIZE('Table A',
'Table A'[Category]
),
IF([Measure 1] <> BLANK(),[Measure 1],
IF( MAX('Table B'[Name]) IN {"A","A1","A2"},
[Cost Measure],
[Cost Measure 2] * [Actual Measure]
)
)
)
Hi Uzi2019 ,
Try to replace MAX with SELECTEDVALUE so that It will behave according to your slicer value.Measure=
SUMX(
SUMMARIZE('Table A',
'Table A'[Category]
),
IF([Measure 1] <> BLANK(),[Measure 1],
IF( SELECTEDVALUE('Table B'[Name]) IN {"A","A1","A2"},
[Cost Measure],
[Cost Measure 2] * [Actual Measure]
)
)
)
8 Replies
- Tahreem24
Super User
Hi Uzi2019 ,
Try to replace MAX with SELECTEDVALUE so that It will behave according to your slicer value.Measure=
SUMX(
SUMMARIZE('Table A',
'Table A'[Category]
),
IF([Measure 1] <> BLANK(),[Measure 1],
IF( SELECTEDVALUE('Table B'[Name]) IN {"A","A1","A2"},
[Cost Measure],
[Cost Measure 2] * [Actual Measure]
)
)
) - amitchandak
Super User
Uzi2019 , Try a measure like ( Small changes)
Measure= SUMX( SUMMARIZE('Table A', 'Table A'[Category],"_1", IF([Measure 1] <> BLANK(),[Measure 1], IF( MAX('Table B'[Name]) IN {"A","A1","A2"}, [Cost Measure], [Cost Measure 2] * [Actual Measure] ) )) , [_1]) - AlB
Community Champion
Hi Uzi2019
From what table is Name? TableB? Can you share the pbix, or a pbix with mock data that reproduces the problem?
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
- Uzi2019
Community Champion
I have a slicer for Name which list of values. When I select All values from slicer so only Else part (Cost Measure 2 * Actual Measure) part gets executed.
But I want to show sum of all names means Cost Measure and plus Cost Measure 2 * Actual Measure.Please help me out as I have a report delivery in next one Hour. - Uzi2019
Community Champion
amitchandak AlB Anonymous nandukrishna Greg_Deckler n all other Experts
Please take a look into this issue and please help me to find the solution.
I would really appreciated your help.