Forum Discussion
TCGH
2 years agoRegular Visitor
Variance /slicer dependent/ need help for the formula
Hello I am trying to visualize the variance between production plans. I tried a simple formula like this one: SelectedCriteria = SELECTEDVALUE('SlicerTable'[Criteria]) Measure1 = CALCULATE(SUM('P...
- Anonymous2 years ago
Hi TCGH ,
If you select multiple plans in one slicer, you can't locate the one you selected.
As you can see, below both of these scribing formulas are the same, the computer doesn't recognize the first selected plan you are talking about, and the second plan.
You have to create two tables like I did to implement your first slicer's choice and second slicer's choice, and the two slicers were not related to each other.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
TCGH
2 years agoRegular Visitor
Hi
I view your youtube and tried your solution and came up with this formula:
MeasureVol = CALCULATE(SUM('PRODUCTION'[Volumes]),Filter(all('PRODUCTION'[Plan]),'PRODUCTION'[Plan] in ALLSELECTED('PRODUCTION'[Plan])))
What I end up with is having one additional measured column which is equal to the prod plan I selected in the slicer. When I select the second plan, I get the same: an additional column with the same volume nb.
What I need is the variance between these columns. I want only one column showing Plan 1 - Plan 2.
What I need is the variance between these columns. I want only one column showing Plan 1 - Plan 2.
How can I customzie the formula something like that
MeasureVol = CALCULATE(SUM('PRODUCTION'[Volumes]),Filter(all('PRODUCTION'[Plan]),'PRODUCTION'[Plan] in ALLSELECTED('PRODUCTION'[Plan]))) - CALCULATE(SUM('PRODUCTION'[Volumes]),Filter(all('PRODUCTION'[Plan]),'PRODUCTION'[Plan] in ALLSELECTED('PRODUCTION'[Plan])))
Whereas the first part should be for Plan 1 and second part for plan 2 in a way that it recognized that the first selection from the slicer is plan 1 and second is part 2