Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register 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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 22 | |
| 10 | |
| 10 | |
| 6 | |
| 5 |