RunW February 2016
How to count orders with condition A and B in dax
I have a table with order number and product code. One order can have multiple lines. I would like to count the number of orders which have BOTH product code A AND product code B.
My table looks like this:
So for this result set, the answer would be 2, as both Order1 and Order3 contains both A and B.
I would very much like to create this as a measure in dax.
GregGalloway February 2016
MyTable[ProductCode] = "A"
IF(CALCULATE(COUNTROWS(MyTable),MyTable[ProductCode] = "B") > 0,1)
Asked in February 2016
Viewed 3,064 times
Answered 1 times
Leave an answer
Quote of the day: live life