Forum Discussion

Elisa_E's avatar
Elisa_E
Helper I
8 years ago
Solved

Dynamic text based on slicer

Hello,   I have a some string text I would like to include on top of a chart showing sales when certain a first slicer is selected. This first variable is "company". I managed to do this with a car...
  • v-ljerr-msft's avatar
    v-ljerr-msft
    8 years ago

    Hi Elisa_E,

     

    Could you try using the formula below to create a measure, then just show the measure on the Card visual(no need to apply it as visual level filter) to see if it work in your scenario?

    Measure = 
    IF (
        HASONEVALUE ( Table1[Region] ) || HASONEVALUE ( Table1[Service Type] ),
        "",
        IF (
            HASONEVALUE ( Table1[Company] ),
            FIRSTNONBLANK ( Table1[Dynamic text], 1 ),
            ""
        )
    )
    

    Remark: You'll need to replace Table1 with your real table name.

     

     

    Here is the sample pbix file for your reference. :smileyhappy:

     

    Regards