Forum Discussion
apradh6
6 years agoFrequent Visitor
Handle formatting with multiple data type in same column
Hi, My data has a column which has both the count and dollar amounts. Is it possible to preserve this in a table in power bi? I want to show the dollar amount in currency format and count in decima...
Kumail
4 years agoImpactful Individual
Hello apradh6
Hope the below measure helps.
FormatDataType =
VAR Val = SUM ( 'Table'[Activity Progress] )
RETURN
SWITCH (
SELECTEDVALUE ( 'Table'[DataType] ),
"Dollar", FORMAT ( Val, "$0" ),
"WholeNumb", FORMAT ( Val, "0.00" )
If you have any other queries, you can send the sample .pbix file by adding it to your drive or dropbox and add the link here.
Regards
Kumail Raza
Did this help? Kudos are appreciated.
Consider Accept it as the solution to help the other members find it more quickly.