Forum Discussion

veryconfused's avatar
veryconfused
Frequent Visitor
5 years ago
Solved

Slicer Filter Interaction With Chart

I have a weekly report that needs to show data from that week, controlled by a slicer set as a dropdown (ex, Week Ending 8/9).   The issue is that I need all visualizations to follow the slicer exc...
  • richbenmintz's avatar
    richbenmintz
    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!