Forum Discussion

aakgun's avatar
aakgun
Frequent Visitor
10 years ago
Solved

Dynamic Formatting Measure numerical values

I need a workaround for my Measure values. I have percentage and decimal values for my meaure. For percentage ones, I need to display it as formatting "25 % " not like 0.25 or anythig like that.

 

The mesaure value change will be according to the MyField,. So, for  BLABLA Percentage % data in my Myfiled, I need display this value as " 25  % "

 

solution should be like:

 

TextMeasure = IF([MyField]="BLABLA Percentage %", < Something value like 25 %>, [AMOUNT])

 

Can I implement any workaround for this requirement ?

DAta Format is not availbale inside the IF block. Also Measure Formatting option can not be applied because all of the value fileds will be displayed as percentage then.

 

do you have any other opinion

 

Thank you

  • aakgun

    If your scenario is not as I thought in below case, please be more specific.

    Measure = IF(LASTNONBLANK(Table1[MyField],1)="BLABLA Percentage %",AVERAGE(Table1[value])*100&"%",SUM(Table1[value])&"")


5 Replies

  • aakgun's avatar
    aakgun
    Frequent Visitor

    Hi all,

     

    I want to some more clarify about problem.

     

    Can we use text data as measure in Data Field of MAtrix objects. I want to display my data with "% " sign as text value, according to the data rows. So it is a kind of conditional display.

     

    I see in forums that  there is a custom measure like " text measure" , but I could not implement it in Power BI desktop.

     

    Dou you have any workaround or opinion for this issue.

    • Eric_Zhang's avatar
      Eric_Zhang
      Microsoft Employee

      aakgun

      If your scenario is not as I thought in below case, please be more specific.

      Measure = IF(LASTNONBLANK(Table1[MyField],1)="BLABLA Percentage %",AVERAGE(Table1[value])*100&"%",SUM(Table1[value])&"")


      • aakgun's avatar
        aakgun
        Frequent Visitor

        Hi Eric,

         

        Thank you for that workaround. I have displayed as I desired. Just I had a small modification for formatting numerical values.

         

        I have used following formatting, and now dispay excellent for my PErcentage labelled values..

         

        FORMAT(AVERAGE(tableName[VALUEKolon] ) * 100 , "###,###.##") & " %"

         

        Thanks so much