I have a table with OrderNo and ProductCategory. One order can have many order lines. One order can also have different ProductCategories on the lines. The table looks like this:
OrderNo ProductCategory O1 Cat1 O1 Cat2 O1 Cat3 O2 Cat1 O3 Cat4
I would like a calculated column "CalcC" that returns 1 if Cat1 exists for an OrderNo. I want the 1 to be returned for all rows with that OrderNo.
My result table would look like this:
OrderNo ProductCategory CalcC O1 Cat1 1 O1 Cat2 1 O1 Cat3 1 O2 Cat1 1 O3 Cat4 0
If someone can help me achieve this with some DAX syntax, I would be most grateful.
Thank you.