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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
cs141005
Regular Visitor

Column with different data types

Dear all,

 

I would need your support if possible..

Currently within my dataset there is a table "SUM" like below, where columns "Jan" and "Feb" contains both decimal and whole numbers data types.

 
 
 

Is it possible to convert some of the whole number to currency and some other to decimal with 2 decimal places ?

I think that in Power BI a column has only one data type.

 

demo.png

 

Is there any way to achieve the desired output?

 

Sincerely ,

Mary

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @cs141005 ,

First of all, all values of one field can only have one data type. If the data type of the field Jan and Feb is Numeric type and later the values in these two fields need to participate in the calculation, it will not be possible to achieve the result you want. If their data type is Text type, you can use FORMAT function to change their data form just as shown in the below screenshot. Please find the details in the attachment.

Use custom format strings in Power BI Desktop

yingyinr_0-1623145046451.png

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @cs141005 ,

First of all, all values of one field can only have one data type. If the data type of the field Jan and Feb is Numeric type and later the values in these two fields need to participate in the calculation, it will not be possible to achieve the result you want. If their data type is Text type, you can use FORMAT function to change their data form just as shown in the below screenshot. Please find the details in the attachment.

Use custom format strings in Power BI Desktop

yingyinr_0-1623145046451.png

Best Regards

VijayP
Super User
Super User

@cs141005 

You can do that using IF and FORMAT Function but you may lose control on calculations




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.