The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello,
I want to create a slicer which shows start date and end date.
End date should be today's date by default and start date should be -12 months with 1st day of the month.
For example the end date is 20/7/2023, start date should be 1/7/2023.
Thank you in advance.
Solved! Go to Solution.
Hi @Sanskruti ,
Please create a measure:
Measure =
VAR _today = TODAY()
VAR _12_month_1st_date = EOMONTH(_today,-13) + 1
VAR _filter = IF(MAX('Date'[Date])>=_12_month_1st_date && MAX('Date'[Date])<=_today,1)
RETURN
_filter
And apply it to slicer's filter:
Output:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
@Sanskruti Hey,
You can use below method to fulfill your requirement .
select your date slicer then select relative date from date filter pane then select last 1 year and check including today. Kindly refer below image.
Thanks
Harish M.
Hi @Sanskruti ,
Please create a measure:
Measure =
VAR _today = TODAY()
VAR _12_month_1st_date = EOMONTH(_today,-13) + 1
VAR _filter = IF(MAX('Date'[Date])>=_12_month_1st_date && MAX('Date'[Date])<=_today,1)
RETURN
_filter
And apply it to slicer's filter:
Output:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hello @Sanskruti ,
Refer to this solution https://community.fabric.microsoft.com/t5/Desktop/Custom-default-date-on-date-range-slicer/m-p/24630...
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Follow me on Linkedin
Vote For my Idea 💡
Proud to be a Super User! | |