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
Actually, I have met a problem about how to filter the special column by criterias.In Exccel,if+Countifs is easy.
City Transportation Metro?
Beijing Air Yes
Beijing Metro Yes
Beijing Train Yes
Shanghai Air Yes
Shanghai Metro Yes
Shanghai Train Yes
Nanchang Air No
Nanchang Train No
so my question is : how to get column"Metro?" by DAX functions?
Hi @Nightlight
As tested, Zubair_Muhammad's formula can get the expected results as the picture you provided.
Best regards
Maggie
Hi
You can use this calculated column in Power BI
Column =
CONTAINS (
FILTER ( Table1, Table1[City] = EARLIER ( Table1[City] ) ),
[Transportation], "Metro"
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 46 |