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.
Hello all. I am trying to create a 30,60,90 day filter for a table that has tasks, and then states their due date. Except the DAX formula keeps old dates, meaning dates that are older than today, as seen in the picture below.
What did I need to add into my formula to remove the October 19, 2020 Due Date?
The end result should be that when I select 30 days pending only one task appears, the November 1, 2020 task.
Days Pending = CALCULATE(MAX('Table'[Task Next Milestone Due Date]),
FILTER('Table','Table'[Task Next Milestone Due Date]<=TODAY()+SELECTEDVALUE('Days Pending'[Days Pending],MAX('Days Pending'[Days Pending]))))
Solved! Go to Solution.
Hi @Anonymous ,
You are only defining the top values for your filtering so in term of formula you are returning all the values from your table where the Milestone Due Date is lower than TODAY + X days so all your values are within this values, you need to place also the lower value.
Rewrite your measure to :
Days Pending =
CALCULATE (
MAX ( 'Table'[Task Next Milestone Due Date] ),
FILTER (
'Table',
'Table'[Task Next Milestone Due Date]
<= TODAY ()
+ SELECTEDVALUE (
'Days Pending'[Days Pending],
MAX ( 'Days Pending'[Days Pending] )
)
&& 'Table'[Task Next Milestone Due Date] >= TODAY ()
)
)
The formula after the && is returning all the values where the due date is higher than today, so now you have the following syntax:
Today <= Milestone Due Date <= Today + Xdays
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
You are only defining the top values for your filtering so in term of formula you are returning all the values from your table where the Milestone Due Date is lower than TODAY + X days so all your values are within this values, you need to place also the lower value.
Rewrite your measure to :
Days Pending =
CALCULATE (
MAX ( 'Table'[Task Next Milestone Due Date] ),
FILTER (
'Table',
'Table'[Task Next Milestone Due Date]
<= TODAY ()
+ SELECTEDVALUE (
'Days Pending'[Days Pending],
MAX ( 'Days Pending'[Days Pending] )
)
&& 'Table'[Task Next Milestone Due Date] >= TODAY ()
)
)
The formula after the && is returning all the values where the due date is higher than today, so now you have the following syntax:
Today <= Milestone Due Date <= Today + Xdays
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering 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 |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |