Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I am currently working on a Power BI report and need a little bit of assistance in regards to a date slicer.
So I am looking at sales of items and want one of my tabs to be a selected time frame, for example a week. I then would like to have another tab that has sales for the 3 weeks prior to the one selected on the first tab. Is there a way to do this?
For example, I would like to select say Sep 9, 2024 - Sep 15, 2024 on the first tab to see those sales, but then I would like the second tab to sum up sales from August 19th, 2024 - September 8th, 2024 automatically.
Thanks!
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Sales: =
SUM( sales[sales] )
Sales 3 weeks prior: =
CALCULATE (
[Sales:],
'calendar'[date]
>= MIN ( 'calendar'[date] ) - 27,
'calendar'[date]
<= MAX ( 'calendar'[date] ) - 27
)
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Sales: =
SUM( sales[sales] )
Sales 3 weeks prior: =
CALCULATE (
[Sales:],
'calendar'[date]
>= MIN ( 'calendar'[date] ) - 27,
'calendar'[date]
<= MAX ( 'calendar'[date] ) - 27
)
This is really good, but is there a way for me to have two tabs, one with the selected date range on a slicer that is linked with another slicer on the second tab that has the last 3 weeks.
Here is example:
Tab 1:
Tab 2:
Thanks for the reply from @Jihwan_Kim , please allow me to provide another insight.
Hi @Anonymous ,
Do you mean that after the slicer in Tab 1 selects the values, the slicer in Tab 2 automatically selects the corresponding values?
If so, then it is impossible.
A slicer can only filter other slicers and cannot control the selection of other slicers.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
30 | |
13 | |
11 | |
9 | |
6 |