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
jpt1228
Responsive Resident
Responsive Resident

Best practice to deal with column mixed value/text

Hello, I am working on a new data model and I have a column that has text, whole numbers, and decimal numbers. I need to create calculations with the numeric values in this column but can't convert column type to value due to text in column - Which I may need the text.

 

Should I pivot the column into seperate columns by value type or create 3 different tables - Each filtered on the data type: Table1 then reference Table1 and filter column for text rename table Table1text, Reference Table1 and filter column for whole number and rename Table1wholenum for each data type?

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I would just add a new column in the one table that will be used for calculations. 

try
Number.From([Value])
otherwise
null

PQ new Column for want numbers and null for text.png

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

I would just add a new column in the one table that will be used for calculations. 

try
Number.From([Value])
otherwise
null

PQ new Column for want numbers and null for text.png

jpt1228
Responsive Resident
Responsive Resident

Never thought of that. Great simple solution @Anonymous 

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.