Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

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. 

1 ACCEPTED SOLUTION

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

View solution in original post

8 REPLIES 8
v-xicai
Community Support
Community 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

v-xicai
Community Support
Community 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
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

Hi  @Anonymous ,

 

The "-28" is referred to the "covering a 4 week " as DamnFoolEeejit said. 

You can learn more about the DATESINPERIOD https://docs.microsoft.com/en-us/dax/datesinperiod-function-dax .

 

Best Regards,

Amy

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?

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

Anonymous
Not applicable

Page 1 - Summary viewPage 1 - Summary view

Anonymous
Not applicable

Page 2 - A week by week snapshotPage 2 - A week by week snapshot

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.