Forum Discussion

IF's avatar
IF
Icon for Post Prodigy rankPost Prodigy
6 years ago
Solved

SELECTEDVALUE 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 ...
  • lkalawski's avatar
    lkalawski
    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! 😀