Forum Discussion
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
- some_bihCommunity Champion
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.
- some_bihCommunity Champion
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 columnTODAY(), -- Today-6, -- the set needs to contain 6MONTH -- months))DAX function DATESINPERIODhttps://learn.microsoft.com/en-us/dax/datesinperiod-function-dax?WT.mc_id=DP-MVP-4025372
Did I answer your question? Kudos appreciated / accept solution!
- monicajsvFrequent Visitor
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,
- AnonymousNot applicable
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
- AnonymousNot applicable
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