Forum Discussion
Anonymous
9 years agoNot applicable
calculate where does not equal wildcard
I'm trying to calculate the total of "Credit Memo" where Cust_Ref1 is not "JTPD" or where Cust_Ref1 starts with a "W". Here is what I got but it does not work. Any advice would be appreciated. Tha...
- 9 years ago
Anonymous
SumValueFilters = CALCULATE ( SUM ( Table1[Value] ), FILTER ( Table1, LEFT ( Table1[Cust_ref1] ) <> "W" && Table1[Cust_ref1] <> "JTPD" ) )
Anonymous
9 years agoNot applicable
Neither solution seems to work properly. My SQL query was:
WHERE not CUST_REF1 = 'JTPD' and not CUST_REF1 like 'W%'
and that worked but now I need to include everything in the sql query and use dax formulas to remove the JTPD and starts with "W".
Vvelarde
Community Champion
9 years agoAnonymous
SumValueFilters =
CALCULATE (
SUM ( Table1[Value] ),
FILTER ( Table1, LEFT ( Table1[Cust_ref1] ) <> "W" && Table1[Cust_ref1] <> "JTPD" )
)