Forum Discussion

Pim123's avatar
Pim123
Regular Visitor
3 years ago
Solved

Filling missing prices in dataset

Hi, 

 

I'm trying to get the below graph with a total price of a item basket against QTY. The red line shows the price development of the price basket. In my data set not every item has been sold in every month. So, when I add all the items to the line will fluctuate a lot because the item scope with a price is not consistent. See the first table of my data example.

 

 

So I'm trying to either fill the months where there is no list price for specific items with the price from the last month before it. Or I have a list with when which list price was active and trying to make that to a month list with a value for every month. I'm not sure which solution is easiast to implement. Or perhaps another solution?

 

example of my data:

 Product 1Product 2Product 3
Jan-23100150110
Feb-23100 110
Mar-23105150120
Apr-23105  
May-23105165 
Jun-23110165130
    
ItemPriceStart DateEnd Date
Product 110001/01/202328/02/2023
Product 110501/03/202331/05/2023
Product 111001/06/2023 
Product 215001/01/202330/04/2023
Product 216501/05/2023 
Product 311001/01/202328/02/2023
Product 312001/03/202331/05/2023
Product 313001/06/2023 

 

Thanks for the help!

 

Kind regards,

 

Pim

  • Hi Pim123 

     

    Based on the current table structure, the first solution would be easier. After changing column types, you can select all "Product X" columns and use Fill Down to fill the null values. Notice that this is done with Power Query Editor. 

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

     

3 Replies

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi Pim123 

     

    Based on the current table structure, the first solution would be easier. After changing column types, you can select all "Product X" columns and use Fill Down to fill the null values. Notice that this is done with Power Query Editor. 

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

     

    • Pim123's avatar
      Pim123
      Regular Visitor

      Hi Jing, 

       

      I finally found a solution for my second solution. Thanks for the reply anyway. 

      I tried your solution as well and it seems to work as well. 

       

      Kind regards,

       

      Pim