Forum Discussion
Create Measure - Period On Period % Diff, Based On User's Input In Built-In Relative Date Slicer For
- 4 years ago
Hi CALCULATEpizza ,
Believe that the main issue you have here is the fact that you cannot know how the relative slicer selection is made, if it's on weeks, month or days.
What you can do keeping the two measures you have is to create a measure that gets the context of the matrix, and returns the correct measure:
Switch bewteen = if(ISINSCOPE('Date Dimension'[Week]), [WEEK ON WEEK % DIFFERENCE], [MONTH ON MONTH % DIFFERENCE])Has you can see when you drill up or down the calculations changes:
Hi Anonymous,
Thanks so much for your response, unfortunate the measure doesn't provide the output I'm looking for. I've updated my original post with the expected results.
I have also reuploaded the pbix file. In this update:
- added 2 measures to demonstrate what the output should be
Hi CALCULATEpizza ,
Believe that the main issue you have here is the fact that you cannot know how the relative slicer selection is made, if it's on weeks, month or days.
What you can do keeping the two measures you have is to create a measure that gets the context of the matrix, and returns the correct measure:
Switch bewteen = if(ISINSCOPE('Date Dimension'[Week]), [WEEK ON WEEK % DIFFERENCE], [MONTH ON MONTH % DIFFERENCE])
Has you can see when you drill up or down the calculations changes:
- CALCULATEpizza4 years agoFrequent Visitor
MFelix Thanks so much! This solves exactly what I'm trying to accomplish. Appreciate your time looking into this.