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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
monicajsv
Frequent Visitor

Relative date filtering

I have a list of elements with a planned end date and I would like to do a relative filtering of the date in the visualization to only show those whose end date is greater than or equal to 6 months ago and those that have a date in the future, I am using a slicer with relative date style, but it only allows me to see those of the last x months, those of the next months or those of the current month, I do not see an option that allows me to do what I want to show from a relative date in forward including those of the future, do you have any idea how I could do it?

Thanks in advance!

10 REPLIES 10
v-shex-msft
Community Support
Community Support

Hi @monicajsv ,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
some_bih
Super User
Super User

Hi @monicajsv possible solution as following

If you need measure then it could be like:

Measure test=
CALCULATE (

SUM(Yourtable[somecolumn]),

DATESINPERIOD (
        'Date'[Date],           -- Your Date key column
        TODAY(),                -- Today
        -6,                      -- the set needs to contain 6
        MONTH                   -- months
    )
)
 
DAX function DATESINPERIOD

https://learn.microsoft.com/en-us/dax/datesinperiod-function-dax?WT.mc_id=DP-MVP-4025372

 

Did I answer your question? Kudos appreciated / accept solution!

 





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

Proud to be a Super User!






Hello,

I don't need a measure, I just want to be able to filter them.

Thanks for your help, I think I'll use a colum to calculate if the date is within the relative period I need and the use this column to filter.

Regards,

 

HI @monicajsv,

Maybe you can try to add a calculated column to compare with current date and table date to map records with period tags. Then you can use this field on filter to filter your visual records based on period tags.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
some_bih
Super User
Super User

Hi @monicajsv check link for example

https://learn.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range 

Hope this help, kudos apprreciated.





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

Proud to be a Super User!






Thanks for your reply, but this options don't resolve what I would like to filter

Hi @monicajsv so you want to control some end of months in past / future? If yes, what is reference date, previous month or...share example with output





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

Proud to be a Super User!






What I would like to have is a behaviour like the "After" Slicer style, but with tthe "after" date always showing today minus 6 months automatically

Hi @monicajsv seems possible (without lot of effors 🙂).

I would like to see example from your side and expected output so we do not spend time guessing what is request.





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

Proud to be a Super User!






What I would like to to is configure the date to be always today minus 6 months to always have a list of the deliverables with baseline delivery date from 6 months ago onwards

Slicer.PNG

Regards

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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