Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am trying to create a measure that will slice a date by 30, 60, and 90 days from current day. I have an expiration date column and I am trying to create a slicer that lets me show accounts that will be expiring in the next 30, 60, and 90 days from the current day. Any ideas?
Solved! Go to Solution.
HI, @KGuyton
You could try this way as below:
Step1:
Add a simple table that only contains 30,60,90 value for slicer.
For example:
In the example, I use a simple data sample
Step2:
Then add this conditional in your formula
Measure = CALCULATE(SUM('Table'[Value]),
FILTER('Table','Table'[Date]<=TODAY()+SELECTEDVALUE(Days[Days after],MAX(Days[Days after]))))
Result:
here is sample pbix file, please try it.
Best Regards,
Lin
If the data is updated everyday the simplest method is to create a calculated column that contains the designation 30, 60, 90 days. Then you can use this calculated column in a slicer.
If you are in the situation where you need this to be 100% dynamic, then you need to use the Disconnected Table Trick. As this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...
I am not sure how to create such a table.
update: I went ahead and created a new table with a period that I was able to add a relationship to my existing calendar using this code:
HI, @KGuyton
You could try this way as below:
Step1:
Add a simple table that only contains 30,60,90 value for slicer.
For example:
In the example, I use a simple data sample
Step2:
Then add this conditional in your formula
Measure = CALCULATE(SUM('Table'[Value]),
FILTER('Table','Table'[Date]<=TODAY()+SELECTEDVALUE(Days[Days after],MAX(Days[Days after]))))
Result:
here is sample pbix file, please try it.
Best Regards,
Lin
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |