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

data per week

hiii

 

i have created my sla per month now i want it to be showed as per week and i have a slicer that shows months.

what i want to do is i need a slicer for weeks if i click on a week it should show the calculations for that week.

my week start from monday to sunday

can some sow me how can i do that i am attaching my pbix file as well.

https://drive.google.com/file/d/1BqXcqHerCJ4DuGIjl757X3jlDXZz4iQ8/view?usp=sharing

 

 

1 ACCEPTED SOLUTION
v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Do you want to create another measure that changes with Week?

If yes, we can create the weeknum column and two measures to meet your requirement.

 

1. Create week columns in Table.

 

weeknum = WEEKNUM('Table'[Call Closed],2)
weekName = "Week"&" "&WEEKNUM('Table'[Call Closed],2)

 

data1.jpg

 

2. Then we can create a slicer using the weekName column. And create two measures.

 

selected week num = 
var _x = SELECTEDVALUE('Table'[weekName], "Week 1")
return
CALCULATE(MAX('Table'[weeknum]),FILTER('Table','Table'[weekName]=_x))

 

RAW_SLA% _Week = 
CALCULATE (
    [RAW SLA%],
    filter (Query1,
        WEEKNUM(query1[Call Closed]) = [selected week num]
            
    )
)

 

data2.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

It will be helpful if you can show us the exact expected result based on the tables.

 

Best regards,

 

Community Support Team _ zhenbw

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

 

BTW, pbix as attached.

View solution in original post

3 REPLIES 3
v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

How about the result after you follow the suggestions mentioned in my original post?

Could you please provide more details or expected result about it If it doesn't meet your requirement?

If you've fixed the issue on your own please kindly share your solution. If the above posts help, please kindly mark it as a solution to help others find it more quickly.

 

Best regards,

 

Community Support Team _ zhenbw

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

v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Do you want to create another measure that changes with Week?

If yes, we can create the weeknum column and two measures to meet your requirement.

 

1. Create week columns in Table.

 

weeknum = WEEKNUM('Table'[Call Closed],2)
weekName = "Week"&" "&WEEKNUM('Table'[Call Closed],2)

 

data1.jpg

 

2. Then we can create a slicer using the weekName column. And create two measures.

 

selected week num = 
var _x = SELECTEDVALUE('Table'[weekName], "Week 1")
return
CALCULATE(MAX('Table'[weeknum]),FILTER('Table','Table'[weekName]=_x))

 

RAW_SLA% _Week = 
CALCULATE (
    [RAW SLA%],
    filter (Query1,
        WEEKNUM(query1[Call Closed]) = [selected week num]
            
    )
)

 

data2.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

It will be helpful if you can show us the exact expected result based on the tables.

 

Best regards,

 

Community Support Team _ zhenbw

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

 

BTW, pbix as attached.

amitchandak
Super User
Super User

@Anonymous , How create a choice Week

https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Power-BI-Turning/ba-p/1187482

 

Column in date Table //you can use a week table if need , just create correct rank

Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Week Number = WEEKNUM([Date],2)
Week = if('Date'[Week Number]<10,'Date'[Year]*10 & 'Date'[Week Number],'Date'[Year]&'Date'[Week Number])
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
Week name = [Week Start date] & " to "& [Week End date]
Weekday = WEEKDAY([Date],2)
WeekDay Name = FORMAT([Date],"ddd")

 

 

Measures

Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
This Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))
Last year Week= CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=(max('Date'[Week Rank]) -52)))
Last 8 weeks = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]>=max('Date'[Week Rank])-8 && 'Date'[Week Rank]<=max('Date'[Week Rank])))

 

Power BI — WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123

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

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.