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!View all the Fabric Data Days sessions on demand. View schedule
Hello,
I am struggling to write a DAX Calculation to report the number of records that qualify based on multiple components.
I have tried to use the "OR" function several different ways and the only one I can get to work provides me with the incorrect count. (code below)
I know I should have 19 qualified lines using this logic.
Opportunity Solution = X and Created Date Year = 2020
Plus
Opportunity Solution = Y and Created Date Year = 2020
However, based on the below code I receive the count of 63.
Solved! Go to Solution.
Try this one :
Try this one :
Hello @Matt0515 ,
Try this:
Measure 2020 =
VAR _Filter2020 =
FILTER('Table',
'Table'[Created Date Year] = 2020
)
VAR _Count =
CALCULATE(
COUNTROWS('Table'),
_Filter2020,
'Table'[Opportunity Solution] = "X" || 'Table'[Opportunity Solution] = "Y"
)
RETURN
_Count
Cheers!
Vivek
If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂
https://www.vivran.in/
Connect on LinkedIn
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 8 | |
| 5 | |
| 3 |
| User | Count |
|---|---|
| 28 | |
| 20 | |
| 19 | |
| 19 | |
| 12 |