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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
astroboy
Regular Visitor

value from row above

 

hi, 

 

i'm new to this whole DAX thing and need help with a powerbi query

 

my dat is as follows

 

A document no. can have multiple account no.  i'm tyring to create a new column where the account no fill down to the below blank rows.  

 

 

Document No     line no     acct. No.    new column

P1000                   1000        6100                6100

P1000                   2000                                6100

P1000                   3000                                6100

P2000                   1000         7000               7000

P2000                   2000         8000               7000

P3000                   1000         6500               6500

P3000                   2000                                6500

P3000                   3000         6800               8000

P3000                   4000                                8000

P3000                   5000                                8000

 

any help with this would be greatly appreciated.

3 REPLIES 3
astroboy
Regular Visitor

 

hi, 

 

i'm new to this whole DAX thing and need help with a powerbi query

 

my dat is as follows

 

A document no. can have multiple account no.  i'm tyring to create a new column where the account no fill down to the below blank rows.  

 

 

Document No     line no     acct. No.    new column

P1000                   1000        6100                6100

P1000                   2000                                6100

P1000                   3000                                6100

P2000                   1000         7000               7000

P2000                   2000         8000               8000

P3000                   1000         6500               6500

P3000                   2000                                6500

P3000                   3000         8000               8000

P3000                   4000                                8000

P3000                   5000                                8000

 

any help with this would be greatly appreciated.

Seward12533
Solution Sage
Solution Sage

Searching the forum I found this solution by @ 

 

To adapt this to your problme I added an index column to your data in the PowerQuery (Edit Query) using the Add Index button in the add column ribbon. With the index column added this worked!

 

Fixed Account No = 
IF([Account No],[Account No],
CALCULATE(LASTNONBLANK(Table1[Account No],Table1[Account No]),
FILTER(Table1,Table1[Index]<=EARLIER([Index]))
)
)

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors