Forum Discussion

nirvana_moksh's avatar
nirvana_moksh
Impactful Individual
7 years ago
Solved

Matrix with different format for values

Hello All,   I am running into an issue wherein I am trying to create the below visual which is a matrix. In regards to the data, I have manipulated it by unpivoting the data and getting all 'Colum...
  • v-lili6-msft's avatar
    7 years ago

    HI, nirvana_moksh 

    You could use FORMAT Function to custom format it 

    Measure = IF(SELECTEDVALUE('Table'[Attribute])="%GROWTH", FORMAT(CALCULATE(SUM('Table'[Value])),"Percent"),FORMAT(CALCULATE(SUM('Table'[Value])),"Currency"))

    Result:

    BeforeAfter

    and here is pbix file, please try it.

     

    Best Regards,

    Lin