Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Multi-format numbers in the same column

Dear community very good afternoon, I have the following problem:

I have a numeric type column called Value Month, what I need is for the prensentaod value in the table to have its corresponding format. That is, for example for the first row, "Cost Reduction" I need it to be displayed in Euro Currency format, for the next row I need it to be displayed with a normal number and for the third I need it to be displayed in percentage format.

I tried to do it using conditional columns, but the display in the table makes me dirty because of the number of additional columns I need to add.

alexis0730_1-1655420024167.png

Is there a functional way that allows me to give a specific format to each value depending on the unit I need?

I also have a column called unity that I can use as a conditioner.

I remain attentive to some extra data that can serve me.

Best regards.

1 ACCEPTED SOLUTION
Hariharan_R
Solution Sage
Solution Sage

Hi

Try like below.

Result =
VAR _Type =
SELECTEDVALUE ( 'Table'[Type] )
VAR _value =
SUM ( 'Table'[Value] )
RETURN
SWITCH (
TRUE (),
CONTAINSSTRING ( _Type, "$" ), FORMAT ( _value, "$ #,00" ),
CONTAINSSTRING ( _Type, "Days" ), FORMAT ( _value, "#,00" ),
CONTAINSSTRING ( _Type, "%" ), FORMAT ( _value, "#.00 %" )
)

Hariharan_R_0-1655438869048.png

Thanks

Hari

Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


My Blog :: YouTube Channel :: My Linkedin


View solution in original post

2 REPLIES 2
Hariharan_R
Solution Sage
Solution Sage

Hi

Try like below.

Result =
VAR _Type =
SELECTEDVALUE ( 'Table'[Type] )
VAR _value =
SUM ( 'Table'[Value] )
RETURN
SWITCH (
TRUE (),
CONTAINSSTRING ( _Type, "$" ), FORMAT ( _value, "$ #,00" ),
CONTAINSSTRING ( _Type, "Days" ), FORMAT ( _value, "#,00" ),
CONTAINSSTRING ( _Type, "%" ), FORMAT ( _value, "#.00 %" )
)

Hariharan_R_0-1655438869048.png

Thanks

Hari

Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


My Blog :: YouTube Channel :: My Linkedin


Anonymous
Not applicable

tried switch function in my report page did not get the result .  used new column write the following 

SWITCH(

    TRUE(),
    MLayout[name] = "Revenue", [Revenue],
    MLayout[name] = "Gros Profit", [GP],
    MLayout[name] = "Gros Margin",FORMAT([GP Margin],"#.00 %")
    )
 
error message " expression that yield variant data-type can not be used to define calculated columns"

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.