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 have the following data
order | stauts |
216 | submited |
216 | accepted |
217 | submited |
217 | resumited |
217 | accepted |
i need to count the number of orders that got accepted without being reaplied so in this case it should give one order
i wrote the following dax but it is NOT helping
AcceptedOrdersWithoutResubmit = CALCULATE( COUNTROWS('Table'), FILTER( 'Table', 'Table'[stauts] = "accepted" && NOT ( CALCULATE( COUNTROWS('Table'), FILTER( 'Table', 'Table'[order] = EARLIER('Table'[order]) && 'Table'[stauts] = "resumited" ) ) > 0 ) ) )
please help and thank you
Solved! Go to Solution.
Hi, @mina97 ,
The following DAX might work for you:
UniqueOrdersCount = COUNTROWS(VALUES('Table(2)'[order]))
The final output is shown in the following figure:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mina97 ,
The following DAX might work for you:
AcceptedOrdersWithoutResubmit =
COUNTROWS(
FILTER(
'Table',
'Table'[status] = "accepted" &&
NOT(
CALCULATE(
COUNTROWS('Table'),
FILTER('Table', 'Table'[status] = "resumited"),
ALLEXCEPT('Table', 'Table'[order])
) > 0
)
)
)
The final output is shown in the following figure:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hey can you make it count the unique numbers order
because i have other status and i do not want it to count them fore xample
216 | Sumbit |
216 | Review |
216 | Paid |
216 | Approved |
the dax counted this as 4 😞 please help
Hi, @mina97 ,
The following DAX might work for you:
UniqueOrdersCount = COUNTROWS(VALUES('Table(2)'[order]))
The final output is shown in the following figure:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
it should be 1
wrong it gived zero 😞
Hi, @mina97
try below just adjust your table aand column name
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 |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |