Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have the following table in my query editor:
I need to create a measure that counts the number of 'Closed' items (under 'Status'), where the 'Created' date is in the last 30 days.
How can I express this in DAX?
Thanks in advance for any help.
Solved! Go to Solution.
Try the following formula:
Last 30 days = CALCULATE ( COUNT( Table[Project ID] ), FILTER ( ALL ( Table ), Table[Created ] >= MAX ( Table[Created ] ) - 30 && Table[Created] <= MAX ( Table[Created] ) && Table[Status] = "Closed" )
Try the following formula:
Last 30 days = CALCULATE ( COUNT( Table[Project ID] ), FILTER ( ALL ( Table ), Table[Created ] >= MAX ( Table[Created ] ) - 30 && Table[Created] <= MAX ( Table[Created] ) && Table[Status] = "Closed" )
Thank you!
I've tweaked the formula slightly to look for values in the last 30 days as follows:
Last 30 days = CALCULATE ( COUNT( Table[Project ID] ), FILTER ( ALL ( Table ), Table[Created ] >= Today() - 30 && Table[Created] <= MAX ( Table[Created] ) && Table[Status] = "Closed" )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
130 | |
80 | |
53 | |
38 | |
35 |
User | Count |
---|---|
204 | |
81 | |
71 | |
53 | |
50 |