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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Different Datatype under same Column

I was hoping someone could help me out. i have a dataset in excel where a column has multiple datatype, like currency, text, decimals and %. Is there a way those datatype can remian as is in power BI under one column ?

or 

 if i have a Matrix table and i want to make some value have the dollar ($) currency in front and some have Percentage (%) 
For example: Those circled in red i want them to be $1234 and those in yellow to be 1.23%

RilwanFlame_0-1647485119483.png

 

 

1 ACCEPTED SOLUTION
Tutu_in_YYC
Super User
Super User

Hi RilwanFlame,

There is no way a column can have multiple data type. If it is a mix, it will usually end up a Text as data type.

But you can hack it using DAX by adding switch statements for different cases where you need different units, and you have to hard code them.

Check this example:

Tutu_in_YYC_0-1647495095448.png


And this is the measure:

 

SWITCH = 

VAR A = SELECTEDVALUE('Sales Territories'[Country])
RETURN

SWITCH(
TRUE(),
SELECTEDVALUE('Sales Territories'[Country]) = "Canada", [Percentage] * 100 & "%",
SELECTEDVALUE('Sales Territories'[Country]) = "Australia", "$" & [Total Sales]
)

 

If you want to do this, you need to separate your column with mixed data types into multiple columns with different types, or else you cannot aggregate the columns to create a measure.

View solution in original post

1 REPLY 1
Tutu_in_YYC
Super User
Super User

Hi RilwanFlame,

There is no way a column can have multiple data type. If it is a mix, it will usually end up a Text as data type.

But you can hack it using DAX by adding switch statements for different cases where you need different units, and you have to hard code them.

Check this example:

Tutu_in_YYC_0-1647495095448.png


And this is the measure:

 

SWITCH = 

VAR A = SELECTEDVALUE('Sales Territories'[Country])
RETURN

SWITCH(
TRUE(),
SELECTEDVALUE('Sales Territories'[Country]) = "Canada", [Percentage] * 100 & "%",
SELECTEDVALUE('Sales Territories'[Country]) = "Australia", "$" & [Total Sales]
)

 

If you want to do this, you need to separate your column with mixed data types into multiple columns with different types, or else you cannot aggregate the columns to create a measure.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors