Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hello Community,
I have a issue I can't wrap my head around... which I think is simple... but maybe not.
I'm trying to get a IF statement to work to tell me if when an EP number is both registered in "X" and "Y" (e.g. Greece & Cyprus)
the result should be a true / false. It is only true if the EP number is present in both country simultaneously.
IF "For and EP number" Has X and has Y as matching registration country (evaluated on all the values within that column for the same EP number)
= "True"
Thus for the table here below, the first two rows should return "True" as well as the two following one's.
| EP | Country |
| EP1469879 | Greece |
| EP1469879 | Cyprus |
| EP1523638 | Greece |
| EP1523638 | Cyprus |
| EP1565201 | Greece |
| EP1585548 | Greece |
| EP1585548 | Cyprus |
| EP1589941 | Greece |
| EP1617382 | Greece |
| EP1644558 | Greece |
| EP1654861 | Greece |
| EP1706471 | Greece |
| EP1735358 | Greece |
| EP1750538 | Greece |
| EP1750538 | Cyprus |
| EP1755483 | Greece |
| EP1830239 | Greece |
| EP1851372 | Greece |
| EP1855060 | Greece |
| EP1866492 | Greece |
| EP1871314 | Greece |
Thank you very much for your help!
Solved! Go to Solution.
Hi @Gm0 ,
I created a calculated column to implement it. You could have a try.
Column =
var d = CALCULATE(DISTINCTCOUNT('Table'[Country]),ALLEXCEPT('Table','Table'[EP]))
return
IF(d>1, "True", BLANK())
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.
Hi @Gm0 ,
I created a calculated column to implement it. You could have a try.
Column =
var d = CALCULATE(DISTINCTCOUNT('Table'[Country]),ALLEXCEPT('Table','Table'[EP]))
return
IF(d>1, "True", BLANK())
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.
Thanks all for your input!
Hello,
Have you tried to make a measure where the functions IF and AND will be combined to one.
You will have to use a formula like this: measure = IF(AND(country = "Greece"; country = "Cyprus") true; false)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 77 | |
| 37 | |
| 31 | |
| 29 | |
| 26 |