Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Dynamic slicers

Hello,

I'm looking to make dynamic slicers for Value and Volume aswell as YTD and MAT. 

I've created to separate tables for Value/Volume and YTD/MAT


I've then created measure for this period and previous period by using:

This year =
SWITCH(
SELECTEDVALUE('Dynamic'[Group]),
"Verdi", Datagrunnlag[Total sale],
"Volum", Datagrunnlag[Total sale in units]
)

Aswell as:
Last year=
SWITCH(
SELECTEDVALUE('Dynamic'[Group]),
"Verdi", [Total sales last year],
"Volum", [Total sales last year in units]
)


This works well. I add a slicer and I am able to switch between value and units in my matrix table.
However, this is where i'm struggling. I am not sure how to create a similar action for a measure slicer.
I need a slicer that by choosing "MAT" or "YTD", it will recognize if I've chosen "Value" or "Units" in the other slicer, and it will show me "MAT" og "YTD" for either "Value" og "Units" for this period and the last period.
I've created measures for Units YTD, Units YTD-1, Value YTD, Value YTD-1, Units MAT, Units MAT-1, Value MAT and Value MAT -1. 

Would appreciate any help!