Forum Discussion
k3rz0rg
3 years agoAdvocate III
Need help with multiple filter values in DAX!
Hi everyone, I've been trying to do the following codes in a DAX formula, however, it is not working as it does via applying the filters on filter pane. I have Stage column with value from A to E an...
- 3 years ago
Hi k3rz0rg
try with this one ..Measure 3 =VAR SUMMRIZE_=CALCULATETABLE('DATA',not( 'DATA'[Stage] in{ "A", "Other"}))VAR Result=CALCULATE(SUMX(FILTER(SUMMRIZE_,[Field 1]="Spend Management"&&[Type] = "New"&&[Code] <> 1231),[Credit]))RETURN Result
Note: If this post helps mark this one as accepted.
sanc_152
3 years agoHelper I
Hi k3rz0rg
try with this one ..
Measure 3 =
VAR SUMMRIZE_
=CALCULATETABLE(
'DATA',
not( 'DATA'[Stage] in{ "A", "Other"})
)
VAR Result=
CALCULATE(
SUMX(
FILTER(SUMMRIZE_,
[Field 1]="Spend Management"&&
[Type] = "New"&&
[Code] <> 1231
),
[Credit]
)
)
RETURN Result
Note: If this post helps mark this one as accepted.
- k3rz0rg3 years agoAdvocate III
Although this was marked as Solution randomly by default, however, it didn't work for me. While IN{ } works for the int values, it does not work for the texts in Power BI I found and had to create multiple variable for each IN filter and add those variables up in the return. Makes the code longer but at least works.
Thanks for the response though, I learned something new through that.