cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dmtjon
Frequent Visitor

Select X days after a selected date in the slicer

Hi,

 

I have seen some posts with almost similar questions but I haven't found the solution yet.

https://community.powerbi.com/t5/Desktop/How-to-show-next-2-days-of-selected-date/m-p/335396#M150062

This one seemed close, but it has 3 slicers and I only have one.

 

So I have 

DateStore NumberSales
1-1-201011500

1-2-2010

11700

1-3-2010

11800

 there are some more stores and some more dates. But I want to select one date and then select 28 days ahead of the selected date in the slicer.

 

This is my slicer.

 

Date Selection.png

The graph should display 28 days after the selected slicer date.

Date Selection 2.png

 

Could someone please help.

 

2 ACCEPTED SOLUTIONS

Hi @dmtjon ,

 

Check the following steps.

1# Create a CALENDAR table and use 'CALENDAR'[Date] as slicer.

2# Create a measure as below and add it to the visual filter: measure = 1

 

 

Measure = IF(SELECTEDVALUE('Table'[Date])>=SELECTEDVALUE('CALENDAR'[Date])&&SELECTEDVALUE('Table'[Date])<SELECTEDVALUE('CALENDAR'[Date])+3,1,0)

 

 

Result would be shown as below and you can change "+3" to "+28" in your scenario.

3.PNG

4.PNG

 

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

 

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

6 REPLIES 6
Greg_Deckler
Super User IV
Super User IV

Well, either create a disconnected date table for your slicer or you will have to use ALL/ALLEXCEPT/REMOVEFILTERS in some sort of measure. I'm not clear on the graph you posted, is that what you want to see or ?

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...

 


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




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

Proud to be a Super User!




No the graph, is not what I want to see unfortunately that shows all dates. But once I select a date I want it to show all dates 28 days after the selected date on the slicer. So for example if I select 1-1-2010, I want the graph to show 1-1-2010, 1-2-2010, 1-3-2010, till 1-28-2010

 

Hi @dmtjon ,

 

Check the following steps.

1# Create a CALENDAR table and use 'CALENDAR'[Date] as slicer.

2# Create a measure as below and add it to the visual filter: measure = 1

 

 

Measure = IF(SELECTEDVALUE('Table'[Date])>=SELECTEDVALUE('CALENDAR'[Date])&&SELECTEDVALUE('Table'[Date])<SELECTEDVALUE('CALENDAR'[Date])+3,1,0)

 

 

Result would be shown as below and you can change "+3" to "+28" in your scenario.

3.PNG

4.PNG

 

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

 

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

Hi @dmtjon ,

 

Here's my PBIX, hopefully works for you.

 

Best Regards,

Jay

 

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Hi @dmtjon ,

 

It should be "," or ";" not ".".

 

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors