Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext 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
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.
Is there any way to achieve the desired output?
Sincerely ,
Mary
Solved! Go to Solution.
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
Best Regards
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
Best Regards
You can do that using IF and FORMAT Function but you may lose control on calculations
Proud to be a Super User!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 31 | |
| 27 | |
| 24 |