Forum Discussion
How to retrieve selected value from a slicer without crossfiltering?
Hello,
I have a slicer that the user selects the fiscal year from. I also have a matrix visualisation which the slicer does not filter (there are reasons) under "Edit Interactions" the cross filter setting is set to "None". Please can you tell me how to retrieve the selected fiscal year from the slicer so that I can use it in a measure within the matrix? Or should I be doing this another way? e.g. a parameter?
Many thanks for your help,
CW
You could create a disconnected table for use in the slicer. Make sure that the Edit Interactions is set to filter and then the measure will be able to retrieve the SELECTEDVALUE of the column from the disconnected table.
You can create the table with something like
Slicer dates = VALUES('Date'[Financial year])
2 Replies
- johnt75
Super User
You could create a disconnected table for use in the slicer. Make sure that the Edit Interactions is set to filter and then the measure will be able to retrieve the SELECTEDVALUE of the column from the disconnected table.
You can create the table with something like
Slicer dates = VALUES('Date'[Financial year]) - WaysRegular Visitor
I had this exact issue and disconnecting the tables wasn't "ideal".
It's clunky but I got around this issue via:Measure = VAR vSlicer = VALUE(CALCULATE( CONCATENATEX( VALUES('Slicer Table'[Slicer Field]), 'Slicer Table'[Slicer Field], "," ),REMOVEFILTERS('Measure Table') ) ) RETURN SWITCH(vSlicer, 1,'Measure Table[Measure 1], 2,'Measure Table[Measure 2], BLANK() )
I used an Index field within the Slicer Table rather than the Text based Slicer itself. This way I could VALUE() the Index to an integer and use SWITCH(). Otherwise remove the VALUE() function and nest IF().