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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
tksnota
Post Patron
Post Patron

Get Value from one Column to Another When One Column Starts With A Character: Prefer DAX

 

Hi,

 

Can anyon help me on this one so the respected columns will only be populated by the appropriate values.

 

Thanks...tksnota...

tksnota_0-1735001308391.png

 

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

Hi @tksnota ,

 

I think you can try code as below to create calculated columns. If [reknr] is data like 40010, you can set the data format as whole number.

 

reknr_crd (DAX) = IF('Table'[reknr] = 40010 || 'Table'[reknr] in GENERATESERIES(70000,79999,1),'Table'[bdr_hfl],0)
reknr_drd (DAX) = IF('Table'[reknr] in GENERATESERIES(80000,89999,1),'Table'[bdr_hfl],0)

 

Result is as below.

vrzhoumsft_0-1735096668112.png

 

Best Regards,
Rico Zhou

 

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

3 REPLIES 3
v-rzhou-msft
Community Support
Community Support

Hi @tksnota ,

 

I think you can try code as below to create calculated columns. If [reknr] is data like 40010, you can set the data format as whole number.

 

reknr_crd (DAX) = IF('Table'[reknr] = 40010 || 'Table'[reknr] in GENERATESERIES(70000,79999,1),'Table'[bdr_hfl],0)
reknr_drd (DAX) = IF('Table'[reknr] in GENERATESERIES(80000,89999,1),'Table'[bdr_hfl],0)

 

Result is as below.

vrzhoumsft_0-1735096668112.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

suparnababu8
Solution Sage
Solution Sage

Hi @tksnota 

 

Can you pls provide a sampl data with editable form not int the image. So, we'll help you to solve your problem.

 

Thanks

ryan_mayu
Super User
Super User

could you pls provide the sample data (not the screenshot) and the expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.