This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi,
I'm somewhat new with DAX and am having an issue with creating a measure (it is probably easy but it is eluding me).
I'm creating a measure that will count the product codes in a column but I want it counted only for 5 of the many values.
So, for example, I've tried:
Product Count = Calculate(CountA (Product[type] ), Product[type]=10, Product[type]=12, Product[type]=14 ......
This works for the first product type but when I add the additional filters (12,14, etc) the result is blank. I'm assuming this is acting as an AND or it is looking for diffternt Columns to filter on. At any rate, what I'm doing is obviously wrong. I've tried other variations but I'm not finding a solution.
Any help would be appreciated!
Solved! Go to Solution.
Hi.
Use || (OR)
Product Count = Calculate(CountA (Product[type] ), Filter(Product[Type],Product[type]=10 || Product[type]=12 || Product[type]=14 ))
Hi.
Use || (OR)
Product Count = Calculate(CountA (Product[type] ), Filter(Product[Type],Product[type]=10 || Product[type]=12 || Product[type]=14 ))
Worked! Thank you!
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 25 | |
| 22 | |
| 20 | |
| 14 |
| User | Count |
|---|---|
| 51 | |
| 47 | |
| 23 | |
| 18 | |
| 18 |