Forum Discussion

ChrisCam's avatar
ChrisCam
Frequent Visitor
7 years ago
Solved

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

  • Anonymous's avatar
    Anonymous
    7 years ago

    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

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

     

     

     

    Thanks & Regards,

    B V S S

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi ChrisCam ,

     

    Can you please share your desired output

     

     

    Thanks & Regards,

    B V S S

    • ChrisCam's avatar
      ChrisCam
      Frequent Visitor

      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's avatar
        Anonymous
        Not applicable

        Hi ChrisCam ,

         

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