Forum Discussion
Slicer Filter Interaction With Chart
- 6 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 richbenmintz
Had to whip up some dummy data. Posted at the link below. Thanks again.
(Edit: Below link updated w/ data showing different sales per week.)
https://www.dropbox.com/s/lxfoxejuh43kzmt/DummyReportSlicers.pbix?dl=0
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!