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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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 @Anonymous ,

 

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

Anonymous
Not applicable

6 REPLIES 6
Greg_Deckler
Super User
Super User

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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

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 @Anonymous ,

 

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.
Anonymous
Not applicable

 

 

Hi @Anonymous ,

 

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 @Anonymous ,

 

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.