Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a multiple DAX which are giving me different parameters value.
I have a slicer of week selection in my report.
Now I want to show graph of last 4 weeks values of all DAX measure in graph based on single selection in week slicer.
For eg. In slicer if i selected 45, in graph it should x axis as 41, 42,43 and 44 against which i get DAX values.
I have a dim_date column which has date,weekofyear and other columns. That dim_date is one dimension date table used in the report.
Solved! Go to Solution.
@DaredevilzHere is the DAX logic which might work in your case.
Previous 4 Weeks Value =
VAR SelectedWeek = SELECTEDVALUE(dim_date[WeekofYear])
RETURN
CALCULATE(
[Base Measure],
FILTER(
ALL(dim_date),
dim_date[WeekofYear] >= SelectedWeek - 4 && dim_date[WeekofYear] < SelectedWeek
)
)
I you want to create line chart or bar chart. Add the Previous 4 Weeks Value measure to the y-axis and
Add the dim_date[WeekofYear] column to the x-Axis.
@DaredevilzHere is the DAX logic which might work in your case.
Previous 4 Weeks Value =
VAR SelectedWeek = SELECTEDVALUE(dim_date[WeekofYear])
RETURN
CALCULATE(
[Base Measure],
FILTER(
ALL(dim_date),
dim_date[WeekofYear] >= SelectedWeek - 4 && dim_date[WeekofYear] < SelectedWeek
)
)
I you want to create line chart or bar chart. Add the Previous 4 Weeks Value measure to the y-axis and
Add the dim_date[WeekofYear] column to the x-Axis.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 8 | |
| 8 | |
| 7 |