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 veryconfused,
You will need a disconnected Week Dimension that you can use as the X Axis for your Chart. Then you would create a measure like the one below:
Dynamic X axis =
var selectedWeek = max('calendar'[Week])
var floorWeek = max('calendar'[Week])-6
return
if
(
HASONEVALUE('Calendar dynamic'[Week]) && VALUES('Calendar dynamic'[Week]) >=floorWeek && VALUES('Calendar dynamic'[Week]) <= selectedWeek,
CALCULATE(SUM(FTE[FTE]), 'Calendar'[Week] = VALUES('Calendar dynamic'[Week]))
,BLANK()
)
Essentially you are assigning a value where the disconnected week is between the floor and ceiling weeks, otherwise Blank() is returned, leaving you with a chart that looks something like
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!