Forum Discussion
Anonymous
7 years agoNot applicable
Wrong selectedvalue calculation
Hi! I have a report with a slicer by Code, when I select any of this code I need to see the summarize of this material with this code and the material with code ¨-¨. I'm trying to use SELECTEDVA...
- Anonymous7 years ago
Anonymous,
It seems that your expected result is not correct based on the requirement "when I select any of this code I need to see the summarize of this material with this code and the material with code ¨-¨". I create the following columns firstly.specificcodeforamount1 = CALCULATE(SUM(Table1[amount1]),FILTER(Table1,Table1[material]=EARLIER(Table1[material])&&Table1[code]="-"))
specificcodeforamount2 = CALCULATE(SUM(Table1[amount2]),FILTER(Table1,Table1[material]=EARLIER(Table1[material])&&Table1[code]="-"))
And then create the measures below. For more details, please review attached PBIX file.Measure = SUM(Table1[amount1])+MAX(Table1[specificcodeforamount1])
Measure 2 = SUM(Table1[amount2])+MAX(Table1[specificcodeforamount2])
Regards,
Lydia
Anonymous
7 years agoNot applicable
Anonymous,
It seems that your expected result is not correct based on the requirement "when I select any of this code I need to see the summarize of this material with this code and the material with code ¨-¨". I create the following columns firstly.
specificcodeforamount1 = CALCULATE(SUM(Table1[amount1]),FILTER(Table1,Table1[material]=EARLIER(Table1[material])&&Table1[code]="-"))
specificcodeforamount2 = CALCULATE(SUM(Table1[amount2]),FILTER(Table1,Table1[material]=EARLIER(Table1[material])&&Table1[code]="-"))
And then create the measures below. For more details, please review attached PBIX file.
Measure = SUM(Table1[amount1])+MAX(Table1[specificcodeforamount1])
Measure 2 = SUM(Table1[amount2])+MAX(Table1[specificcodeforamount2])
Regards,
Lydia