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 August 31st. Request your voucher.
I have a filter with relative date applied to a visual / page and I would like to display selected period on the report, so it can change dynamically.
Is there a way to get relative filter values (dates) using DAX?
Thanks!!
Solved! Go to Solution.
Hi, @Anonymous
You need to create a consecutive calendar table.
Then you can use 'Min'/'Max' to get the earliest/ latest date in relative date slicer and disply them in each card.
Earliest date = Min('Calendar'[Date])
latest date = MAX('Calendar'[Date])
You can also concatenate the results as follows in a single card.
Date Range = FORMAT( MIN('Calendar'[Date]),"yyyy-dd-mm")&"~"&format(MAX('Calendar'[Date]),"yyyy-dd-mm")
Best Regards,
Community Support Team _ Eason
Hi, @Anonymous
You need to create a consecutive calendar table.
Then you can use 'Min'/'Max' to get the earliest/ latest date in relative date slicer and disply them in each card.
Earliest date = Min('Calendar'[Date])
latest date = MAX('Calendar'[Date])
You can also concatenate the results as follows in a single card.
Date Range = FORMAT( MIN('Calendar'[Date]),"yyyy-dd-mm")&"~"&format(MAX('Calendar'[Date]),"yyyy-dd-mm")
Best Regards,
Community Support Team _ Eason
That's exactly what I was trying to do. Didn't think about using MAX and MIN.
Thank you @v-easonf-msft !!
@Anonymous , You can do that with an independent date table and period slicer
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
User | Count |
---|---|
75 | |
70 | |
39 | |
30 | |
28 |
User | Count |
---|---|
104 | |
95 | |
51 | |
48 | |
46 |