Forum Discussion
Create a measure to dynamically subtract difference between today's date and date in table
Hi, I have a slicer on a page that allows a user to select the timeframe they want to see data for (month, week, day). If I have a value with a timestamp of today's date, I want my visual to show today's value when the user selects any of the options.
Currently, the value with today's date is just categorized as "day", because I can't figure out how to dynamically filter and get today's date to show for all 3 three timeframes.
Is there a measure I can write that could handle this?
If the timeframe key is from date table , you can try this.
Measure = DATEDIFF(max('Date'[Date]),today(),day)
5 Replies
- ryan_mayuSuper User
If the timeframe key is from date table , you can try this.
Measure = DATEDIFF(max('Date'[Date]),today(),day) - danextianSuper User
- v-aatheequeCommunity Support
Hi stoppm ,
If our response addressed by the community member for your query, please mark it as Accept Answer and click Yes if you found it helpful.Should you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!- v-aatheequeCommunity Support
Hi stoppm ,
We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.
If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!Thank you!