Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Change Reprt Title bsed on a filter selection

Hi!

 

I want to change the title of my report based a particular filter I have .

Basically if the filter is on "A", I should show "Text 1" and if I seelect "B" it should show " Text 2". The text 1 and 2 are just random text that I want to put. 

Help will be greatly appreciated.

  • You need to write a measure that returns the text you want. You could use something like this

     

    title = switch(selectedvalue(table[column]),"A","text 1","B","text 2")

     

    then go to the chart title setting, click on the 3 dots (hidden unless you hover), and set the conditional format based on the measure

  • There are lots of options.

     

    title 2 = switch(selectedvalue(table[column]),"A","text 1","B","text 2","you must select only one value")

     

    or set the slicer to single selection only. 

4 Replies

  • MattAllington's avatar
    MattAllington
    Icon for Community Champion rankCommunity Champion

    You need to write a measure that returns the text you want. You could use something like this

     

    title = switch(selectedvalue(table[column]),"A","text 1","B","text 2")

     

    then go to the chart title setting, click on the 3 dots (hidden unless you hover), and set the conditional format based on the measure

    • Anonymous's avatar
      Anonymous
      Not applicable

      How to handle when there is none selected or all selected?

      • MattAllington's avatar
        MattAllington
        Icon for Community Champion rankCommunity Champion

        There are lots of options.

         

        title 2 = switch(selectedvalue(table[column]),"A","text 1","B","text 2","you must select only one value")

         

        or set the slicer to single selection only.