I have a target/goal column that needs to show different numerical formats in the same column in the table visualization. I also have a FormatType
column which tells what should be the format of the goal column. Below is the example of what the values of the goal column look like and what is desired format I need them to be in.
Goal FormatType Desired Goal Format (Goal2)
0.6 % 60%
33000 $ $33,000
0.0375 % 3.75%
I used the below code to create a new calculated column in DAX but my formatting is still not like I wanted
Goal2 = IF([FormatType] = "%", FORMAT([Goal], "Percent"), FORMAT([Goal], "$##,###"))
Goal2
60.0%
$33,000
3.7%
Also when I do this formatting the Goal2
column become Text datatype column instead of fixed decimal type column.
Any help will be appreciated.