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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
coltcarson
New Member

Columns With Multiple Data Types

Hello,

 

Currently within my dataset there is a column that contains both numerical and text data types. Is it possible to convert the numerical data types to currency values while leaving the text data alone? Everytime I try to change the data type to currency Power BI states "We can't automatically covert the column to Decimal number type", or if I try to modify the data in PowerQuery it will list "Error" for the values with text data (i.e. 20m-30m).

 

Example

 

Amount

20m-30m

100548

100m

50m-75m

11479.2304

 

Output Wanted

Amount

20m-30m

$100,548

100m

50m-75m

$11,479

 

Sincerely,

Colt

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@coltcarson,

 

You may add a calculated column as follows.

Column =
IFERROR ( FORMAT ( CURRENCY ( Table1[Amount] ), "Currency" ), Table1[Amount] )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@coltcarson,

 

You may add a calculated column as follows.

Column =
IFERROR ( FORMAT ( CURRENCY ( Table1[Amount] ), "Currency" ), Table1[Amount] )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Christann
Helper IV
Helper IV

I don't think that this is currently possible in Power BI. You could always try splitting your data into multiple columns, each with it's own datatype. It appears from your example that every third row is the same datatype. Hope this helps! --Christopher

Hi in Power BI (Pivot ou Power Query) a column only have one type. In some cases if we have numbers and text we always set column type as Text.

Hi in Power BI (Pivot ou Power Query) a column only have one type. In some cases if we have numbers and text we always set as Text.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.