The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi all
I need a calculated column that will return me a distinct count where the combination of plant & line is equal to the [Segment] = "AA".
See below a sample:
In this case L1 should return a Yes because it has only the segment AA.
Here is my dax:
Stills Dedicated Line =
VAR x =
CALCULATE(
DISTINCTCOUNT('SKU by line - Official'[Segment]),
FILTER(
'SKU by line - Official',
'SKU by line - Official'[Manufacturing plant of production] = EARLIER('SKU by line - Official'[Manufacturing plant of production]) &&
'SKU by line - Official'[Manufacturing line] = EARLIER('SKU by line - Official'[Manufacturing line]) &&
'SKU by line - Official'[Segment] = "AA"
)
)
RETURN
IF(x = 1, "Yes", "No")
How can i get it right?
Thanks.
Solved! Go to Solution.
Is this what you are looking for?