Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Identify the year/week with the nearest value

Hi, 

 

I am looking forward for your help regarding the points below  

The source data that I have looks as follows, for each week there is one value :

 

I need to identify for each value the 5 top previous week/year that have the closest values, as shown in the example below : 

 

Could please give me an idea how to get this request ? 

 

Ps: I need to implement this on power bi using dax or M

Thank you, 

 

 

 

1 Reply

  • v-lionel-msft's avatar
    v-lionel-msft
    Community Support

    Hi Anonymous ,

     

    But according to your example, these five values are not the closest.

    Please elaborate on what you want.

     

    Best regards,
    Lionel Chen

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