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.
Hi,
I have one expression that works for only one value but having issues trying to expand it for three.
Example - That works for just counting how many times APPLE is listed in the Fruit Column
I want to count how many times, APPLE, PEAR or PLUM are in the same column.
Any Help?
Solved! Go to Solution.
Hi @chris_jones - use the OR command or the || method
Total Count =
CALCULATE ( COUNTROWS ( 'MyData' ),
OR('MyData[Fruit] = "APPLE", OR('MyData[Fruit] = "PEAR", 'MyData[Fruit] = "PLUM")))
Total Count =
CALCULATE ( COUNTROWS ( FILTER( 'MyData' ),
'MyData[Fruit] = "APPLE" || 'MyData[Fruit] = "PEAR" || 'MyData[Fruit] = "PLUM"))
Either of those should work.
Hope this helps
David
Total Count = CALCULATE ( COUNTROWS ( 'MyData' ), 'MyData[Fruit] in { "APPLE","PEAR","PLUM" } )
Hi @chris_jones - use the OR command or the || method
Total Count =
CALCULATE ( COUNTROWS ( 'MyData' ),
OR('MyData[Fruit] = "APPLE", OR('MyData[Fruit] = "PEAR", 'MyData[Fruit] = "PLUM")))
Total Count =
CALCULATE ( COUNTROWS ( FILTER( 'MyData' ),
'MyData[Fruit] = "APPLE" || 'MyData[Fruit] = "PEAR" || 'MyData[Fruit] = "PLUM"))
Either of those should work.
Hope this helps
David
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
6 | |
4 | |
3 | |
3 |
User | Count |
---|---|
11 | |
11 | |
8 | |
8 | |
8 |