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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
leonmholt
New Member

Reading different data types in the same table from Excel

Hi there, I am a new PBI user and have, so far, been able to find answers to any query I had but have not yet cracked this one.

I have an Excel table which outputs different types of data on each row. Below is some mock data I have quickly produced to give an idea of the data set I start with;

CategoryData
Total attendances87%
Number of cupcakes bought58
Number of leaflets dropped97
Number of new sign-ups11

I need to display this table in Power BI but do not need/want any of the contents to change, unfortunately, as Power BI is always thinking ahead I end up with;

CategoryData
Total attendances0.87
Number of cupcakes bought58
Number of leaflets dropped97
Number of new sign-ups11

which is not ideal.

I have looked through available topics but any possible solutions usually revolve around changing the data type of everything in the 'Data' column so was hoping there might be a fix/workaround in order for me to achieve my desired results.

Many thanks,

Léon

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

@leonmholt 

 

Excel handles a different data type for each cell, whereas DAX handles a single data type for each column. You may try using FORMAT.

Column =
FORMAT ( Table1[Data], IF ( Table1[Data] > 1, "General Number", "Percent" ) )
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
Thejeswar
Super User
Super User

Hi @leonmholt ,

The Error that you get says that your column is of the format text. This gives error when you use a comparator operator with it.

In other words, your data column is a text. Hence data > 1 gives you error as you cannot compare a text column to a number.

Check if your data column is of text data type. If so make it a Number.

That should fix this

 

Regards.

Thejeswar

Hi @Thejeswar ,

Thanks for the assistance, I went into 'Query Editor' and, after a few 'trial and errors', changed the data type to "Fixed Decimal Number" then ran the data through @v-chuncz-msft 's formula again and it worked!

Many thanks! Smiley Happy

Léon

v-chuncz-msft
Community Support
Community Support

@leonmholt 

 

Excel handles a different data type for each cell, whereas DAX handles a single data type for each column. You may try using FORMAT.

Column =
FORMAT ( Table1[Data], IF ( Table1[Data] > 1, "General Number", "Percent" ) )
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.

Hi @v-chuncz-msft ,

Many thanks for your suggestion, I have tried to use your methodology to achieve the desired output but am met with an error;

"DAX comparison operations do not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values."

Any further assistance would be greatly appreciated.

Many thanks,

Léon

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors