Forum Discussion
Formatting values separately in unpivot value column
- 3 years ago
Hi harshadrokade ,
If you are using the latest version of Power BI you can use the Dynamic Format, create a measure and on the format select Dynamic then add the following code:
SWITCH ( TRUE (), SELECTEDVALUE ( 'Table'[Attribute] ) IN { "Parameter2", "Parameter4", "Parameter6" }, "#.0%", "#" )https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings
Thanks a ton MFelix . I see you could keep the % formatting of the column as Text in the power query from the first step itself. In my case, when I upload my data in Power bi & see it in Power query, the % columns automatically get converted into decimals & so the % icon doesn't remain with them. That's why I also cant use Text Dax to find the columns having % in them.
In my case, when I unpivot the parameter columns, the % format goes away & it becomes decimals.. As the format changes for % values, my Fax new column cant identify the % columns as those are not Text columns with % in them.
Hi harshadrokade,
After the unpivoting see if the step for the changed type is added if yes delete that step and add the custom column then redo the formatting.
- harshadrokade3 years agoPost Partisan
Thanks a ton MFelix . Your help was very useful..