Forum Discussion
IF
Post Prodigy
6 years agoSELECTEDVALUE with Slicer Selection
Hi, I have the following data: Slider1 Slider2 Date Value DateFormated # A 07.2020 12 1/7/2020 # B 07.2020 14 1/7/2020 C1 A 07.2020 ...
- 6 years ago
Hi IF
Ok, I didn't understand you well last time.
You have two solutions:
1. Create one additional Slider column based on slider1 and slider2. (If slider1 = #, take slider2, otherwise slider1).
Add a new column as a slider and use it for filtering.2. Create a measure:
ValueMeasure = VAR _slider1 = SELECTEDVALUE('Table'[Slider1]) RETURN IF(ISFILTERED('Table'[Slider1]), CALCULATE(Sum('Table'[Value]), All('Table'[Slider2])), CALCULATE(Sum('Table'[Value]), FILTER('Table', 'Table'[Slider1] = "#")) )
_______________
If I helped, please accept the solution and give kudos! 😀
Greg_Deckler
Community Champion
6 years agoIF I mocked this up in a PBIX, can you confirm that I did it correctly? Your measure is going to calculate the SUM for # rows always the way it is written. See PBIX below sig. It is odd that the slicer does not seem to be impacting the card visual though.