Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ErikH321
Regular Visitor

DAX Measure Question...

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!

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@ErikH321

 

Hi. 

 

Use || (OR)

 

Product Count = Calculate(CountA (Product[type] ), Filter(Product[Type],Product[type]=10 || Product[type]=12 || Product[type]=14 ))




Lima - Peru

View solution in original post

2 REPLIES 2
Vvelarde
Community Champion
Community Champion

@ErikH321

 

Hi. 

 

Use || (OR)

 

Product Count = Calculate(CountA (Product[type] ), Filter(Product[Type],Product[type]=10 || Product[type]=12 || Product[type]=14 ))




Lima - Peru

Worked!  Thank you!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors