ssas tabular - How to count orders with condition A and B in dax -
i have table order number , product code. 1 order can have multiple lines. count number of orders have both product code , product code b.
my table looks this:
ordernumber productcode order1 order1 b order2 b order3 order3 b order4 c
so result set, answer 2, both order1 , order3 contains both , b.
i create measure in dax.
thank you.
try this:
sumx( calculatetable( values(mytable[ordernumber]), mytable[productcode] = "a" ), if(calculate(countrows(mytable),mytable[productcode] = "b") > 0,1) )
Comments
Post a Comment