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

Relative Date filters

Hi all,

 

Just wondering if there is a way to get the relative date filter on a visual to change based on an overall date slicer selection?

 

For example, I have user logins and use the relative date filter to show only 'active' users - these are users that have logged in within the past 30 days. This works great when no date slicer is active as it just uses todays date as the end date of the 30 days. 

I need this active user count to change based on the dates of the date slicer selection my report viewers select. So if they select '01-06-2019 to 01-10-2019' I want them to see users that are 'active' within these dates (so must have logged in within 30 days of either the start or end date of the slicer) is this possible to do? Are there any work arounds?

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IX
Super User IX

Re: Relative Date filters

@roBI2020 , Selection Date is not allowed on relative date slicer. There are similar idea's posted. Please vote for that

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19321789-dynamic-date-slicer-impr...

 

other are

https://ideas.powerbi.com/forums/265200-power-bi-ideas/status/1328499?query=relative%20date%20slicer

 

You can try to do something like this

https://www.youtube.com/watch?v=duMSovyosXE

 

or rolling 30 days measure

Rolling 30 day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX(Sales[Sales Date]),-30,Day))  

 

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Appreciate your Kudos. 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

3 REPLIES 3
Highlighted
Super User IX
Super User IX

Re: Relative Date filters

@roBI2020 , Selection Date is not allowed on relative date slicer. There are similar idea's posted. Please vote for that

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19321789-dynamic-date-slicer-impr...

 

other are

https://ideas.powerbi.com/forums/265200-power-bi-ideas/status/1328499?query=relative%20date%20slicer

 

You can try to do something like this

https://www.youtube.com/watch?v=duMSovyosXE

 

or rolling 30 days measure

Rolling 30 day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX(Sales[Sales Date]),-30,Day))  

 

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Appreciate your Kudos. 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted
Post Prodigy
Post Prodigy

Re: Relative Date filters

Dear @roBI2020 ,

 

Yes you can surely do this in Power BI .

 

If you want to see Active users in last 30 Days or as such you can create a Table  showing list of active users which consist all users .

Then You can either add button + bookmark  or Date slicer of per month .

 

 

For button + Bookmark , you can insert no of filter  buttons  lets assume one of them as last 30 Days (name it as last 30 Days ) then add a bookmark while adding a filter on this visual of relative dates on table and update bookmark for same .

and please remeber to insert one more button to clear filter .

 

 

or simply add a hirarchy to date feild and use month in slicer .

 

 

Regards ,

Sujit Thakur 

 

Please appreciate by giving kudos !!!

and Accept if you landed on your solution !!!!

 

if you still are in doubt please reply and ask your doubt 

Happy to help!!!

Highlighted
Frequent Visitor

Re: Relative Date filters

Thanks @amitchandak it's disappointing that this isn't a current function in the relative date filter. I have voted for the idea. 

 

Thank you for the suggestions, I'll try and work around and see if some give me half of what I need.

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Don't miss the Power BI Dev Camp this week!

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Kudoed Authors