Forum Discussion

Balaraju's avatar
Balaraju
Icon for Helper III rankHelper III
3 years ago
Solved

How to replicate Previous Year value with current Year value

Hi All Good morning,

 

I have one scenario like how to replicate previous year value with current year value the data like below.

In the column is star having value for current year I wanted that value should replicate in previous year also the out put table like below.

pls help me out on this.

 

Thanks,

Balaraju.

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Balaraju ,

     

    If [Is Star?] is in your underlying data, I suggest you to try "Fill up" function to achieve your goal.

    Replace "" by "null" in [Is Star?] > Fill up

    My Sample:

    Result is as below.

    For reference:

    Fill values in a column - Power Query | Microsoft Learn

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • HoangHugo's avatar
    HoangHugo
    Icon for Solution Specialist rankSolution Specialist

    Hi, try this

     

    new_Is_star_column = MAXX(CALCULATETABLE([data table],[Product column] =EARLIER ([Product column]),MONTH([MMM-YY column]) = MONTH(EARLIER([MMM-YY column]))), [Is start column])

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Balaraju ,

     

    If [Is Star?] is in your underlying data, I suggest you to try "Fill up" function to achieve your goal.

    Replace "" by "null" in [Is Star?] > Fill up

    My Sample:

    Result is as below.

    For reference:

    Fill values in a column - Power Query | Microsoft Learn

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.