cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KatyaK
Helper I
Helper I

Copy numerical values to new column from column that contains mixed numbers and text

Hi,

Started working with power bi not a long time ago, and I'm struggling with the following calculation:

I have a column that contains mixed numbers and text – all values in the column are text.

For example:

col

4

4

3

CDB

2

1

ABC

 

I need to copy the "numerical" values to a new column as numbers.

New_col

4

4

3

-

2

1

-

Unfortunatly In this model I can't use power query. 

Can anyone advise on how to resolve this?
 
Thank you

 

1 ACCEPTED SOLUTION

Refreshing didn't solve it?

Also, for testing, try doing the same outside of Tabular Editor.

View solution in original post

4 REPLIES 4
rbriga
Advocate I
Advocate I

If you have to do this in DAX (calculated column),

Add the column

 =IFERROR(VALUE([A]),BLANK())

Where [A] is the original mixed column.

Power BI Boards.JPG

Thank you for you response,
I wrote the query in Tabular editor (calculated column)- > 
IFERROR ( VALUE ( Fact_FormAnswerRows[Selected Answers] ), BLANK () )
And when I checked the results in PB the following error was showcased:

KatyaK_0-1626693539633.png

I'm not sure if there is something not current in my query or is it something else?




Refreshing didn't solve it?

Also, for testing, try doing the same outside of Tabular Editor.

View solution in original post

Thanks!
In the end it worked 🙂

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.