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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Chic
New Member

i want to create a new column of numeric values extracted from another column of numeric values?

i need help with creating a new column of numeric values extracted from another column of numeric values using dax in powerbi desktop. 

new column = CALCULATE(COUNT(CUSTOMER[NetPromoterScore]),FILTER(ALL(CUSTOMER),'CUSTOMER'[NetPromoterScore]=9-10))
1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @Chic ,

Thanks for reaching out to us with your problem. Base on your description, it seems that you are trying to create a calculated column which extract the numeric values from another column. You can create a calculated column as below to get it, please find the details in the attachment:

 

Column = 
VAR _pos =
    IFERROR ( SEARCH ( "-", 'CUSTOMER'[NetPromoterScore], 1, 0 ), 0 )
RETURN
    VALUE ( RIGHT ( 'CUSTOMER'[NetPromoterScore], LEN ( [NetPromoterScore] ) - _pos ) ) //VALUE(LEFT([NetPromoterScore],_pos-1))

 

vyiruanmsft_0-1701747306788.png

If the above one can't help you get the expected result, please provide some raw data in your table 'CUSTOMER' (exclude sensitive data) with Text format and your expected result with the specific examples and backend logic. It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
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

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @Chic ,

Thanks for reaching out to us with your problem. Base on your description, it seems that you are trying to create a calculated column which extract the numeric values from another column. You can create a calculated column as below to get it, please find the details in the attachment:

 

Column = 
VAR _pos =
    IFERROR ( SEARCH ( "-", 'CUSTOMER'[NetPromoterScore], 1, 0 ), 0 )
RETURN
    VALUE ( RIGHT ( 'CUSTOMER'[NetPromoterScore], LEN ( [NetPromoterScore] ) - _pos ) ) //VALUE(LEFT([NetPromoterScore],_pos-1))

 

vyiruanmsft_0-1701747306788.png

If the above one can't help you get the expected result, please provide some raw data in your table 'CUSTOMER' (exclude sensitive data) with Text format and your expected result with the specific examples and backend logic. It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Rice
Helper I
Helper I

Unfortunately with so little details I'm not sure I understand what you're looking for.

 

Please read this: How To Get Your Question Answered Quickly .

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Top Solution Authors