Forum Discussion
BKnecht
Kudo Kingpin
10 years agoDAX Calculate IF OR Statement
Im pretty new to writing DAX, and am trying to do something that would be simple in excel, but I can't seem to create it in Power BI. I'm trying to create a custom measure that says: Calcula...
- Anonymous10 years ago
CALCULATE(
SUM(Table[Column X]),
FILTER(
Table,
Table[Column A] = "Renewal" ||
Table[Column B] = "Needs Alignment")
)
Anonymous
10 years agoNot applicable
CALCULATE(<expression>, FILTER( <table>, <table[column] = condition>)) is probably the most generally useful pattern to learn in DAX. The vast majority of measures I write either follow this pattern or contain a part that follows this pattern.
dtartaglia
Resolver I
9 years agoHi KHorseman,
The CALCULATE/FILTER syntax you supplied really helped me with DAX statements in general.
Thanks,
Dan