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
ChrisCam
Frequent Visitor

Get next non blank value in column

Hi everyone,

 

I hope you can help.

I have a report that summarises POs for each account, and then before the next account it shows the account number and overall value.

Ideally I need to show the related account number next to each of the POs, as this joins to another table which needs summarising - the data looks like the image on the left

PO NumberValueAccountOverall PO NumberValueNew Account ColumnOverall
O000100/012529.2   O000100/012529.2100.2011 
 0100.20119.2  0100.20119.2
O000100/0122891.71   O000100/0122891.71100.2104 
 0100.210491.71  0100.210491.71
O000950/0281016.7   O000950/0281016.7100.2211 
 0100.221116.7  0100.221116.7
O000100/01303469   O000100/01303469100.2242 
 0100.2242469  0100.2242469
O000100/0130470.38   O000100/0130470.38100.2334 
 0100.233470.38  0100.233470.38
O000100/0122795   O000100/0122795100.241 
O000100/0122795   O000100/0122795100.241 
O000100/0122795   O000100/0122795100.241 
O000100/01298290   O000100/01298290100.241 
 0100.241575  0100.241575

I have tried creating a dervived table, considered lookups (which went on forever), and hoped there would be a  next non blank value, but nothing seems to work.

I have indexed the table to see if that would help, but have reached an impasse where the brain just won't function anymore.

If anyone could suggest a formula which essentially would be:

If Account<>Blank() Then Account, else equal next non blank in Account Column I would really appreciate it.

Many thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ChrisCam ,

 

You can achieve this in powerquery with couple of steps, See below:

1st 4 columns is originated data last columns is desired out put data

Capture1.JPG

To achieve this Go to Edit Queries -->> Transform tab --->> Click on Fill (See below img)

 

Capture.JPG

 

 

Thanks & Regards,

B V S S

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @ChrisCam ,

 

Can you please share your desired output

 

 

Thanks & Regards,

B V S S

Apologies the table I attached was not very clear - I need to add a new column which should reflect the below:

 PO NumberValueAccountNew Account ColumnOverall 
 O000100/012529.2 100.2011  
  0100.2011100.20119.2 
 O000100/0122891.71 100.2104  
  0100.2104100.210491.71 
 O000950/0281016.7 100.2211  
  0100.2211100.221116.7 
 O000100/01303469 100.2242  
  0100.2242100.2242469 
 O000100/0130470.38 100.2334  
  0100.2334100.233470.38 
 O000100/0122795 100.241  
 O000100/0122795 100.241  
 O000100/0122795 100.241  
 O000100/01298290 100.241  
  0100.241100.241575 
Anonymous
Not applicable

Hi @ChrisCam ,

 

1st 3 Columns are your Actual data and Last 3 Columns are your desired output. Is it correct??

Hi,

 

The originating data is [PO Number]; [Value]; [Account] and [Overall]

The desired output is the column called "New Account Column"

 

Thanks

Anonymous
Not applicable

Hi @ChrisCam ,

 

You can achieve this in powerquery with couple of steps, See below:

1st 4 columns is originated data last columns is desired out put data

Capture1.JPG

To achieve this Go to Edit Queries -->> Transform tab --->> Click on Fill (See below img)

 

Capture.JPG

 

 

Thanks & Regards,

B V S S

This is fantastic - thank you ever so much for such a quick response, and making me aware of a feature I did not even know existed Smiley Very Happy

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