Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
18 | |
18 | |
17 | |
17 |
User | Count |
---|---|
33 | |
25 | |
18 | |
15 | |
13 |