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, below is my example. I want to be able to indicate (in a measure) that Drug Unit, Index 2 had an NDC added for the same index 2. I also want to see instances where that is not happening. For example, there is a drug unit for index 3, but there is no NDC added for index 3. Hope that makes sense. Thanks!!
Solved! Go to Solution.
Hi @PowerBI123456 ,
Please check if this is what you want:
Measure =
IF (
MAX ( 'Table'[Field] ) = "Drug Unit",
IF (
COUNTX (
FILTER ( ALL ( 'Table' ), [index] = MAX ( [Index] ) && [Field] = "NDC" ),
[Data]
) > 0,
"Yes",
"No"
)
)
BTW, .pbix file attached.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @PowerBI123456 ,
Please check if this is what you want:
Measure =
IF (
MAX ( 'Table'[Field] ) = "Drug Unit",
IF (
COUNTX (
FILTER ( ALL ( 'Table' ), [index] = MAX ( [Index] ) && [Field] = "NDC" ),
[Data]
) > 0,
"Yes",
"No"
)
)
BTW, .pbix file attached.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
if(countx(filter(Table, [index] =earlier([Index]) && [Field] = "Drug Unit" && earlier([field]) ="NDC"),[Data])>0, "Yes", "No")
or
if(countx(filter(Table, [index] =earlier([Index]) && [Field] = "Drug Unit" && earlier([field]) ="NDC"),earlier([Data]))>0, "Yes", "No")
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!