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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Replicate value based on similar value in reference column

Hello, 

 

I'm having issues wrapping my head around something that I believe can be easily solved, but I can't find an answer to. 

 

I have a table with a key in the first column that is similar for a set of rows in my table. 

A reference number (013 Ref) that is available for some of the rows in my table. 

 

What I'd like to achieve is to replicate the 013 Ref in a new calculated column (013 Common Ref) for all the rows where the "004 Key" is the same. 

 

GMO__2-1596185963300.png

 

I've tried to use different forms of IF condition in a new calculated column but I'm totally stuck on the second argument 

(simplified DAX logic:) 

  • Column "013 Common Ref" = IF ( "013 ref" <> Blank() , "013 ref" , ?? a expression that would return the first available 013 Ref for all the rows that have a blank 013 ref)???

I thought using some kind of "First non bank value" function, but I can't seem to make it work. 

 

Can anybody help me? 

 

Thank you very much!

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create a new column like

new colum = maxx( filter(Table,[004 Key] = earlier([004 Key])),[013 Ref])

or

new colum = if(isblank([013 Ref]), maxx( filter(Table,[004 Key] = earlier([004 Key])),[013 Ref]),[013 Ref])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Create a new column like

new colum = maxx( filter(Table,[004 Key] = earlier([004 Key])),[013 Ref])

or

new colum = if(isblank([013 Ref]), maxx( filter(Table,[004 Key] = earlier([004 Key])),[013 Ref]),[013 Ref])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak  Thank you very much! 
I knew it was an easy one... still so much to learn 🙂 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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