Forum Discussion

setis's avatar
setis
Post Partisan
5 years ago

Title format on a visual

I'm using a measure to format a title on a visual based on a slicer. 

The measure is:

KPI_Title = 
VAR Selected_KPI = SELECTEDVALUE(Performance_Measures[Name])
RETURN
Selected_KPI & " by month"

 

The issue is that the name of one of the selections is "Absence paid %" and when I select this one, I get the error: "Cannot convert value 'Absence paid % by month' of type Text to type Numeric. 

 

How can I format the SELECTEDVALUE in the measure above to avoid the error due to the "%" symbol?

 

Thanks in advance

8 Replies

  • Hi setis ,

     

    You can try modifying your DAX as follows:

    KPI_Title = 
    VAR Selected_KPI = SELECTEDVALUE(Performance_Measures[Name])
    RETURN
    FORMAT(Selected_KPI, "Standard") & " by month"

     

    Thanks,

    Pragati

    • setis's avatar
      setis
      Post Partisan

      Pragati11 thanks for your answer. Unfortunately, it didn't make the trick. I still get the same error.

       

      • Pragati11's avatar
        Pragati11
        Super User

        Hi setis ,

         

        Do you mind sharing all the options you have in your slicer - Name?

        Also what all fields are you moving to the visual giving error?