Forum Discussion
Switch function not working with a slicer
- 10 months ago
Hi MichaelNiederer ,
The problem is that you have created a column on your model instead of a measure you create the following measure:
Prev_Selection_SwitchCG _1 = SWITCH(TRUE(), [NetSumPrev] >= MIN(CategoryDelNotes[Min]) && [NetSumPrev] < MAX(CategoryDelNotes[MAXREVISED]), 1)Now you should be able to get the result you need.
Be aware that since your max value is blank I created a new column replacing blank by 9999999999
Now if you use this measure on your visual you are able to get the expected result:
If you just filter out the blanks you get the following result the bottom table is the one with the filter applied:
Please see file attached.
Hi MichaelNiederer,
To make the slicer work you need to have the field from the disconnected table in the visual as well as the slicer.
Check below Pbix file for reference:
Thank you.
Hi MichaelNiederer ,
The problem is that you have created a column on your model instead of a measure you create the following measure:
Prev_Selection_SwitchCG _1 =
SWITCH(TRUE(),
[NetSumPrev] >= MIN(CategoryDelNotes[Min]) && [NetSumPrev] < MAX(CategoryDelNotes[MAXREVISED]), 1)
Now you should be able to get the result you need.
Be aware that since your max value is blank I created a new column replacing blank by 9999999999
Now if you use this measure on your visual you are able to get the expected result:
If you just filter out the blanks you get the following result the bottom table is the one with the filter applied:
Please see file attached.
- MichaelNiederer10 months agoNew Member
Thank you very much MFelix, now i understood how to do this 😉
So you will need to add a filter to the visual, then this works.