Forum Discussion
Slicer Filter Interaction With Chart
- 5 years ago
Hi veryconfused ,
please try this measure, it will show the dynamic weeks on the x axis, as an aside your data seems to be the same for each week, why all the bars are the same height.
z.Dynamic X Axis = VAR SelectedWeek = max(fSales[Week End Date (Saturday)]) VAR FloorWeek = max(fSales[Week End Date (Saturday)]) -21 RETURN IF( HASONEVALUE(Weeks[Week End Date (Saturday)]) && VALUES(Weeks[Week End Date (Saturday)]) >= FloorWeek && VALUES(Weeks[Week End Date (Saturday)]) <= SelectedWeek, CALCULATE(sum(fSales[TY Net Sales]), fSales[Week End Date (Saturday)] = values(Weeks[Week End Date (Saturday)])), BLANK() )Hope this Helps,
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
Hi veryconfused ,
please try this measure, it will show the dynamic weeks on the x axis, as an aside your data seems to be the same for each week, why all the bars are the same height.
z.Dynamic X Axis =
VAR SelectedWeek = max(fSales[Week End Date (Saturday)])
VAR FloorWeek = max(fSales[Week End Date (Saturday)]) -21
RETURN
IF(
HASONEVALUE(Weeks[Week End Date (Saturday)]) &&
VALUES(Weeks[Week End Date (Saturday)]) >= FloorWeek &&
VALUES(Weeks[Week End Date (Saturday)]) <= SelectedWeek,
CALCULATE(sum(fSales[TY Net Sales]),
fSales[Week End Date (Saturday)] = values(Weeks[Week End Date (Saturday)])),
BLANK()
)
Hope this Helps,
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
Fantastic, thank you! Seems I had reversed the disconnected and connected date columns in your measure formula.
The sales each week were the same on the dummy data (put it together too fast) - I updated the link above for a version with varying sales data per week in case this thread helps anyone else in the future.