Forum Discussion
Is the correct Dax?
Is this correct formula?
Party count =
CALCULATE(COUNT('Team'[ID]),
FILTER('Team','Team'[Complex]="1" &&
'Team'[Complex]="2" &&
'Team'[Complex]="3"),
FILTER('Team','Team'[Project Type]="ABC"),
FILTER('Team','Team'[Request Type]="Party"))
1,2,3 values are from single column i.e. Complex.
3 Replies
- johnt75
Super User
I think you want an OR condition, not AND - i.e. Team[Complex] is 1 or 2 or 3. You can use
Party count = CALCULATE ( COUNT ( 'Team'[ID] ), 'Team'[Complex] IN { "1", "2", "3" }, 'Team'[Project Type] = "ABC", 'Team'[Request Type] = "Party" )- PowerBIBeginer
Helper V
but i think you have to use filter as well, right? How it will filter values without using 'Filter' here?
- johnt75
Super User
You don't need to explicitly specify FILTER as an argument to CALCULATE except in limited cases. The DAX engine will automatically do the translation for you, and it isn't best practice to use an entire table as a filter, better to just put the filter on the columns you need.