Forum Discussion
Matt0515
6 years agoFrequent Visitor
Measure Using "Or" in a table to Count Rows with multiple qualifiers
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 ...
- 6 years ago
Try this one :
2020 TMS/WS MKT MQL2 =
CALCULATE (
COUNTROWS ( Raw_Data ),
FILTER (
ALLSELECTED ( Raw_Data ),
YEAR ( Raw_Data[Created Date] ) = 2020 &&
(Raw_Data[Opportunity Solution] = "X" || Raw_Data[Opportunity Solution] = "Y")
))
vivran22
Community Champion
6 years agoHello 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