March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I am looking for DAX that will count the number of Opened tasks that are older than 60 days
I have this simple table below
Task | Created |
Opened | 01-Dec |
Closed | 02-Dec |
Closed | 02-Dec |
Closed | 04-Dec |
Opened | 05-Dec |
Opened | 06-Dec |
Opened | 07-Dec |
I will use Card to display this count
Solved! Go to Solution.
As your data is only showing the values from Dec, so no values befor 60 days. To avoid the blank in the count measure use below measure instead.
Measure = var _count=CALCULATE(COUNTROWS(Table1),Table1[Task]="Opened" , Table1[Created]<=TODAY()-60) return IF(ISBLANK(_count),0,_count)
Hi @ymirza,
You can use the below measure
Measure = CALCULATE(COUNTROWS(Table1),Table1[Task]="Opened" , Table1[Created]<=TODAY()-60)
If this helped you, please mark this post as an accepted solution and like to give KUDOS .
Regards,
Affan
Hi @affan thanks for quick response. Yes this is what I need but right now the value returned is "Blank", how do I have Zero or '0' in the count?
As your data is only showing the values from Dec, so no values befor 60 days. To avoid the blank in the count measure use below measure instead.
Measure = var _count=CALCULATE(COUNTROWS(Table1),Table1[Task]="Opened" , Table1[Created]<=TODAY()-60) return IF(ISBLANK(_count),0,_count)
Thanks Affan for the quick support
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |