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,
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!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 135 | |
| 102 | |
| 67 | |
| 65 | |
| 56 |