Forum Discussion
Show data up to slicer date
Hello everyone! I hope someone can help me with a problem I'm having.
So, the purpose of my report is to show the latest status of all cards by modified date up to the date in a slicer.
My formula works fine if I choose all days in a list slicer or I choose a date range in a slicer with 2 dates (where the starting day is the beginning of report and the last day is today or any other date). Since in our reports we don't use date slicers with two dates due to their inconvinience, it is only accepted to use single-select drop-down slicer. So, I need to change my dax formula to show all information up to today's date (or any date in single select slicer), in other words to imitate date slicer with a range.
For date slicers i use a separate dim_date table. My dax formula is the following:
2 Replies
- amitchandak
Super User
Anonymous , prefer a date table
Measure = var _max = maxx(allselected('Date'),'Date'[Date]) return calculate(LASTNONBLANKVALUE(report[card],SUM(Sheet1[Date])), filter(all('Date'),'Date'[Date]<= _max))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-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
Appreciate your Kudos. - AnonymousNot applicable
Hi Anonymous ,
Can you show some sample data and expected result to us so that we can check if our formula is worked?
Best Regards,
Jay