Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Week number calculation

I have one year fillter (Range filter) and one week number filter (Range filter). I want to caluculate values such that when i select year 2021 to 2022 and week number 42 to 10 it will first show data for 42th weeks to 52th weeks for year 2021 and for 1st week to 10 th weeks for year 2022.

 

Note. As there are 52 weeks in one year.

3 Replies

  • Hi Anonymous ,

     

    I think that the easiest way to do this would be a slicer with the year and week number hierarchy in it.   That would allow the user to select the weeks and the years.   

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi collinq I appriciate your response. But that way it will not give a desired result. for example i selected 2021 to 2022 in year filter and 30 to 10 in week filter. It will show me the data, first for year 2021 and weeks (from 10 to 30 weeks) and then for 2022 year. I think might need some dax calculation.

    • collinq's avatar
      collinq
      Super User

      Hi Anonymous ,

       

      Just to clarify - I am suggesting a single slicer, with the hierarchy in it - where the user can pick the months of the year.  Something like this:

       

      And, you could update that to have numbers for the months or to organize it differently to make more sense to you and/or your users (fiscal year months, quarters, or whatever).