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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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")
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 130 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |