Forum Discussion

ADP007's avatar
ADP007
Helper IV
4 years ago
Solved

Format number in matrix

Hi,   Is it possible to format a number as a percentage or a whole number in a matrix depending on a value? In the example below I would like the 7.00% for Likeability to be a whole number so 7.00...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi ADP007 

    Power BI column or measure could be formatted in one data type. So if you format your OOH measure as Percentage data type, all values from this measure will show in Percentage. You can try if function to achieve your goal. New measure will be formatted as text type.

    Try this measure.

    New_OOH = 
    SWITCH(TRUE(),MAX('Table'[KPI]) = "Likeability",FORMAT([OOH]*100,"#.00"),FORMAT([OOH],"#.00%"))

    Result is as below.

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickl