Forum Discussion

a0k08ac's avatar
a0k08ac
New Member
4 years ago
Solved

Dynamic Text Box based on 2 slicers

Hello, I have 2 slicers and the I want the result text box in such a way that if I select the first slicer and don't select any option from the second slicer, the text should be based on only the se...
  • edhans's avatar
    4 years ago

    Something like this should work:

    Text Measure =
    VAR varFirstSlicer =
        SELECTEDVALUE( Table[Field] )
    VAR varSecondSlicer =
        SELECTEDVALUE( Table[Field2] )
    VAR Result =
        IF(
            ISBLANK( varSecondSlicer ),
            varFirstSlicer,
            varSecondSlicer
        )
    RETURN
        Result
    

    If the second slicer has anything but 1 value selected, you'll get the first slicer value.