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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Month and week hierarchy issue

 

 

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

Thanks for the response. I have solved this issue. For this I have created a week number calculated column and month no calculated column. I have mapped month = selectedvalue(month no) && week number=selectedvalue(week number) by using this condition I have got the coresponding month for selected week and selected year. Below is the measure which I have created for week&month hierarchy.

 

 SLA <45 Week% =
Var Sel_yr =  'Sheet'[Selected Year]
Var Sel_Month=selectedvalue('Sheet'[Date].[MonthNo])
Var Sel_Wk = SELECTEDVALUE('Sheet'[Week Number])
Var __Daily='SLA Calculations'[SLA <45]/24
var __weekly = __Daily/7
Return
CALCULATE(__Weekly,'Sheet'[Date].[Year]=Sel_yr,'Sheet'[Date].[Monthno]=Sel_Month, 'Sheet'[Week Number] =Sel_Wk)
 
Best Regards,
SW

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous ,

Is the month slicer referencing the Month field from the Date Hierarchy? If so, please try to create a new calculated column as follows to get the Month, and then use this calculated column to replace the Month field in the previous Date Hierarchy. Later, check if only the corresponding month be displayed when specific year and week be selected. Please find the details in the attachment.

yingyinr_0-1647337163188.png

Month = FORMAT('2020 Master Sheet'[Date],"MMMM")

yingyinr_1-1647337614649.png

Best Regards

Anonymous
Not applicable

Hi @Anonymous,

Thanks for the response. I have solved this issue. For this I have created a week number calculated column and month no calculated column. I have mapped month = selectedvalue(month no) && week number=selectedvalue(week number) by using this condition I have got the coresponding month for selected week and selected year. Below is the measure which I have created for week&month hierarchy.

 

 SLA <45 Week% =
Var Sel_yr =  'Sheet'[Selected Year]
Var Sel_Month=selectedvalue('Sheet'[Date].[MonthNo])
Var Sel_Wk = SELECTEDVALUE('Sheet'[Week Number])
Var __Daily='SLA Calculations'[SLA <45]/24
var __weekly = __Daily/7
Return
CALCULATE(__Weekly,'Sheet'[Date].[Year]=Sel_yr,'Sheet'[Date].[Monthno]=Sel_Month, 'Sheet'[Week Number] =Sel_Wk)
 
Best Regards,
SW
Anonymous
Not applicable

Hi @Anonymous ,

It's glad to hear that your issue has been resolved. And thanks for sharing your solution here. Could you please mark your post as Answered? It will help the others in the community find the solution easily if they face the same issue as yours. Thank you.

Best Regards

amitchandak
Super User
Super User

@Anonymous , not very clear, if year , week and month coming from same table, then they should filter the slicer

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak,

Thanks for the response. Yes, Year, Month and week coming from same table but it's not working.  If I select year and week number then the data is changing and getting expected results but If I select Year, Month and week number then I am not getting exepected result. So, basically Month is not getting filtered here and I didn't understand the reason.

 

Best Regards,
SW

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors