Forum Discussion
GhadaMehrez
Helper III
4 years agoConvert field into percentage
I need to convert field value into percentage but when I choose to show value as a percentage I got all values as 100% which is not right:
Anonymous
4 years agoNot applicable
Hi GhadaMehrez ,
As far as I know , Power BI will convert the data format based on column. According to your screenshot, I think there are two columns in your visual. One column with text data like "Target Guidance(%)", another column with number format data. So if you change the data format as percentage in another column , all data in that column will show as percentage.
I think you can try FORMAT() function and SWITCH() to create a measure. Please note that your measure will be in text format due to Power BI doesn't support multiple data format in one column or measure.
Measure =
SWITCH(
MAX('Table'[Column1]),
"Target Guidance(%)",
FORMAT(COUNT('Table'[Column2]),"#%"),
"Acutal Booked Cost(DKK)",
COUNT('Table'[Column2])
)
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.