This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi,
I am looking to compare data on a week on week basis. I have a column in the date table which gives the start of each week on Monday - Sunday -
Solved! Go to Solution.
Hi @yaman123 ,
I create a sample to have a test.
Data model:
Measure:
Raised Tickets =
CALCULATE(COUNT(Table1[Request Time Only]))Raised Tickets Last Week =
VAR maxSelectedDate =
MAX ( 'Fiscal Calendar'[Date] ) - 7
VAR minSelectedDate =
MIN ( 'Fiscal Calendar'[Date] ) - 7
RETURN
CALCULATE (
COUNT ( 'Table1'[Request Time Only] ),
FILTER (
ALL ( Table1 ),
'Table1'[Request Time Only] >= minSelectedDate
&& 'Table1'[Request Time Only] <= maxSelectedDate
)
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @yaman123 ,
I create a sample to have a test.
Data model:
Measure:
Raised Tickets =
CALCULATE(COUNT(Table1[Request Time Only]))Raised Tickets Last Week =
VAR maxSelectedDate =
MAX ( 'Fiscal Calendar'[Date] ) - 7
VAR minSelectedDate =
MIN ( 'Fiscal Calendar'[Date] ) - 7
RETURN
CALCULATE (
COUNT ( 'Table1'[Request Time Only] ),
FILTER (
ALL ( Table1 ),
'Table1'[Request Time Only] >= minSelectedDate
&& 'Table1'[Request Time Only] <= maxSelectedDate
)
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you! This is working fine!
@yaman123 , Based on what I got. Closed joined with date table having columns like
new columns
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1 //Monday week
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
OR
Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format
example measures
This Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 30 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 63 | |
| 53 | |
| 31 | |
| 23 | |
| 23 |