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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Create 2 date slicers with same Date column

Hi!!

 

I would like to create 2 date slicers that are using the same Date column.

This is how i want it to work: 

 

First slicer: is showing the last 7 days, always visible.

Second slicer: is like a calendar, opened by button (using Bookmarks), contains the last 30 days.

 

My problem is the interaction between these 2 slicers, here is the scenario:

  1. when you open the dashboard, you select a date from first slicer (last 7 days), you get the result
  2. So now i want to select an old date ( last 30 days), so i open the Calendar, the First bookmark resets the 1st slicer, then i close the calendar to see the result. So far so good.
  3. Now i want to see other dates FROM THE 1ST SLICER (last 7 days), if i choose a date, now i have 2 dates selected, one from 1st slicer, and the other one from the 2nd, because the 2nd was not reset !! and that is my problem.

Any ideas how to fix this ? or can i do it another way ? 

 

Thank you in advance.

 

 
 
 
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

You can create a separate table.

5.png

 

Then create the measure.

Filter results = 
SWITCH (
    SELECTEDVALUE ( 'Table (2)'[Slicer] ),
    "last 7 days",
        CALCULATE (
            SUM ( 'Table'[Value] ),
            FILTER ( 'Table', [Date] >= TODAY () - 6 && [Date] <= TODAY () )
        ),
    "last 30 days",
        CALCULATE (
            SUM ( 'Table'[Value] ),
            FILTER ( 'Table', [Date] >= TODAY () - 29 && [Date] <= TODAY () )
        )
)

6.png

 

You can check more details from here.

 

Best Regards,

Stephen Tao

 

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

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.


Best Regards,
Stephen Tao

Anonymous
Not applicable

Hi @Anonymous ,

 

You can create a separate table.

5.png

 

Then create the measure.

Filter results = 
SWITCH (
    SELECTEDVALUE ( 'Table (2)'[Slicer] ),
    "last 7 days",
        CALCULATE (
            SUM ( 'Table'[Value] ),
            FILTER ( 'Table', [Date] >= TODAY () - 6 && [Date] <= TODAY () )
        ),
    "last 30 days",
        CALCULATE (
            SUM ( 'Table'[Value] ),
            FILTER ( 'Table', [Date] >= TODAY () - 29 && [Date] <= TODAY () )
        )
)

6.png

 

You can check more details from here.

 

Best Regards,

Stephen Tao

 

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

Sumanth_23
Memorable Member
Memorable Member

hi @Anonymous - can you please share your data model if it does not have any sensitive data? Thanks! 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!

Proud to be a Super User!



PaulDBrown
Community Champion
Community Champion

@Anonymous 

 

Check out this thread and see if it helps:

Two slicers 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.