Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello team,
How to show current selected week from one slicer and past selected week from other slicer into matrix table.
Week can be random selected from both slicer to get the difference between sales value from those selected week.
Solved! Go to Solution.
Use a single slicer to let your report users pick any two weeks. Then use Visual Calculations to show the difference.
Hi,
Thanks for the solution Omid_Motamedise and lbendlin offered, and i want to offer some more information for user to refer to.
hello @Gaurangkd , you can refer to the following solution.
Sample data
Create a calendar table. and create 1:n relationship between tables.
Calendar = ADDCOLUMNS(CALENDAR(DATE(2024,1,1),DATE(2024,12,31)),"WeekNo",WEEKNUM([Date],2))
Then create a sum measure to calculte the sum.
Sum = SUM('Table'[Value])
Create a _diff measure to calculate the difference
_diff =
VAR a =
CALCULATE (
SUM ( 'Table'[Value] ),
OFFSET ( -1, ALLSELECTED ( 'Calendar'[WeekNo] ), ORDERBY ( [WeekNo], ASC ) )
)
RETURN
[Sum] - a
Then create a matrix, and put the following field to the visual.
Then create a slicer ,and put the weekNo column to the slicer. in the slicer ,select two week numbers, then in the matrix can diplay the sum and the difference of the two week.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Thanks for the solution Omid_Motamedise and lbendlin offered, and i want to offer some more information for user to refer to.
hello @Gaurangkd , you can refer to the following solution.
Sample data
Create a calendar table. and create 1:n relationship between tables.
Calendar = ADDCOLUMNS(CALENDAR(DATE(2024,1,1),DATE(2024,12,31)),"WeekNo",WEEKNUM([Date],2))
Then create a sum measure to calculte the sum.
Sum = SUM('Table'[Value])
Create a _diff measure to calculate the difference
_diff =
VAR a =
CALCULATE (
SUM ( 'Table'[Value] ),
OFFSET ( -1, ALLSELECTED ( 'Calendar'[WeekNo] ), ORDERBY ( [WeekNo], ASC ) )
)
RETURN
[Sum] - a
Then create a matrix, and put the following field to the visual.
Then create a slicer ,and put the weekNo column to the slicer. in the slicer ,select two week numbers, then in the matrix can diplay the sum and the difference of the two week.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can add a column namely week in the date table and use it for filter, otherwise use the formula like below
Last week = CALCULATE(measure, DATESINPERIOD('Calendar'[date], TODAY(),-7,DAY))
Use a single slicer to let your report users pick any two weeks. Then use Visual Calculations to show the difference.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 7 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 15 | |
| 13 | |
| 12 | |
| 9 |