Forum Discussion

ccrill23's avatar
ccrill23
New Member
4 years ago
Solved

Dynamically change text box based on slicer selection

Hello, 

I am currently building a dashboard for my hospitals call centers and would like for the information in my text box to change based on what I have selected in my slicer. 

 

So when I have WMC Selected

I would like for my text box to read this...

 

and when I have other call centers besides "WMC" selected I would like for the text box to remain blank. 

Is this possible to do? Thank you 

  • Try something like the following measure:

     

     

    VAR CallCentre = SELECTEDVALUE( Table[Call Centre], BLANK() )
    
    RETURN
    
    IF ( CallCentre = "WMC", "Your Text", BLANK() )

     

     

    then drop the measure into a card visual.

3 Replies

  • bcdobbs's avatar
    bcdobbs
    Community Champion

    Try something like the following measure:

     

     

    VAR CallCentre = SELECTEDVALUE( Table[Call Centre], BLANK() )
    
    RETURN
    
    IF ( CallCentre = "WMC", "Your Text", BLANK() )

     

     

    then drop the measure into a card visual.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for this.  When using this formula, it says the syntax for 'Return' is incorrect.

      VAR CallCentre = SELECTEDVALUE('Cost Centers'[Call Center ], BLANK() )
      RETURN
      IF ('Cost Centers'[Call Center ], = "WMC", "Test", BLANK() )
      What are we doing wrong?
      • bcdobbs's avatar
        bcdobbs
        Community Champion

        So in the if statement you've got a comma between Cost Centers'[Call Center ] and equals.

        Also worth checking the white space after [Call Center ] eg does your column end with a space?