Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!