Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

One slicer, 4 separate weekly graphs

Hi all,

 

Is it possible to have a slicer that controls 4 separate graphs, which show the data on a weekly basis for 4 weeks?

 

For clarity, I want one slicer covering a 4 week period eg:

 

8th - 14th July

15th - 21th July

22nd - 28th July

29th July - 4th August

 

With a bar graph for each week. 

 

The next week i run the data, I would want:

 

15th - 21th July

22nd - 28th July

29th July - 4th August

5th  - 11th August

 

and so on. 

  • v-xicai's avatar
    v-xicai
    7 years ago

    Hi  Anonymous ,

     

    It is not possible to use One slicer to filter 4 separate weekly graphs as you showed above. You can put the Week column onto the X axis of the summary bar graph .

     

    Best Regards,

    Amy

8 Replies

  • v-xicai's avatar
    v-xicai
    Icon for Community Support rankCommunity Support

    Hi  Anonymous ,

     

    Would you like to get rolling calculation by 4 weeks? If yes, you can try the measure like DAX below, assuming the table Date is a calendar table.

     

    Date= CALENDAR(MIN(Table1[date]),MAX(Table1[date]))

     

    Measure1 = CALCULATE( COUNT(Table1[value]),DATESINPERIOD ('Date'[Date],LASTDATE ( 'Date'[Date] ),-28,DAY))

     

    Or could you please share your sample data and desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

     

    Best Regards,

    Amy

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Amy

       

      Thanks for responding.  

       

      My aim is to have a summary bar graph of all of the 4 weeks as well as 4 separate week  graphs providing the information, so are you suggesting creating 4 separate tables which provide the weekly information required from the original table that powers the summary bar graph?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Page 1 - Summary view

    • Anonymous's avatar
      Anonymous
      Not applicable

      v-xicai  Hi Amy, Why did you use -28 in your Dax any explanation would appreciate. Thanks

      Laz


      v-xicai wrote:

      Hi  Anonymous ,

       

      Would you like to get rolling calculation by 4 weeks? If yes, you can try the measure like DAX below, assuming the table Date is a calendar table.

       

      Date= CALENDAR(MIN(Table1[date]),MAX(Table1[date]))

       

      Measure1 = CALCULATE( COUNT(Table1[value]),DATESINPERIOD ('Date'[Date],LASTDATE ( 'Date'[Date] ),-28,DAY))

       

      Or could you please share your sample data and desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

       

      Best Regards,

      Amy

       

      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


      v-xicai  hi Amy, any reason why -28 is added? thanks

  • v-xicai's avatar
    v-xicai
    Icon for Community Support rankCommunity Support

    Hi  Anonymous ,

     

    Does that make sense? If so, kindly mark my answer as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

     

    Best regards

    Amy