Forum Discussion
Matt_HD
6 years agoFrequent Visitor
Convert Conditional CountIFS from Excel to DAX , help please
Hi
I have the following excel formula
=IF(
[@[Is Standard]]=FALSE,
COUNTIFS([Programme],[@Programme],[Framework/Standard Title],[@[Framework/Standard Title]],[Overall cohort year],[@[Overall cohort year]]),
COUNTIFS([Framework/Standard Title],[@[Framework/Standard Title]],[Overall cohort year],[@[Overall cohort year]])
)
Assume its all in one table (Table1) how do I write this as a measure?
Thanks in advance
2 Replies
- amitchandakSuper User
Matt_HD , Can you share sample data and sample output in table format?
- AntrikshSharmaCommunity Champion
Try something like this:
Measure = VAR FirstResult = COUNTROWS ( FILTER ( Table, Table[Programme] = "Some Condition" && Table[Framework/Standard Title] = "Some Condition" && Table[Overall cohort year] = "Some Condition" ) ) VAR SecondResult = COUNTROWS ( FILTER ( Table, Table[Framework/Standard Title] = "Some Condition" && Table[Overall cohort year] = "Some Condition" ) ) RETURN IF ( SELECTEDVALUE ( Table[Is Standard] ) = "False", FirstResult, SecondResult )