Forum Discussion
C-F-G
1 year agoFrequent Visitor
Counting distinct over several columns
Hi all, I have an order table lived connected with a SSAS/Report server. The table has columns with vehicle IDs (VINs, not distinct), with project name and with order status. Order status can be ...
- 1 year ago
C-F-G , Create a measure to count the distinct VINs where all orders are cancelled within the same project.
CancelledNoFollowingOrder =
CALCULATE(
DISTINCTCOUNT(orders[VIN]),
orders[status] = "CANCELLED",
NOT (
EXISTS (
FILTER (
orders,
orders[status] = "FINISHED" && orders[VIN] = EARLIER(orders[VIN]) && orders[project] = EARLIER(orders[project])
)
)
)
)
C-F-G
1 year agoFrequent Visitor
Thank you for for advise and guidance. I was able to develop my solution.