Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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 3
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.

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:

collinq_0-1651607488829.png

 

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).

 

 




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




collinq
Super User
Super User

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.   




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.