Forum Discussion
JustinDoh1
4 years agoPost Prodigy
How to express this SQL expression: Table.[ACCOUNTNO] not like '%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]%'
I am trying to express bottom SQL statement in DAX: Table.[ACCOUNTNO] not like '%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]%' I tried with not ( CONTAINSSTRING( 'Table'[ACCOUNTNO], "ABCDEFGHIJKLMNOPQRSTUVW...
- 4 years ago
Table.[ACCOUNTNO] not like '%[A-Z]%' is enough,
For fun only, a showcase of powerful Excel worksheet formula,
- 4 years ago
amitchandak
4 years agoSuper User
JustinDoh1 , This seem file, where are using this like
if (not ( CONTAINSSTRING( 'Table'[ACCOUNTNO], "ABCDEFGHIJKLMNOPQRSTUVWXYZ" )) , "A", "B")
or
calculate(sum(Table[Value]), filter(Table, not ( CONTAINSSTRING( 'Table'[ACCOUNTNO], "ABCDEFGHIJKLMNOPQRSTUVWXYZ" )) )
- JustinDoh14 years agoPost Prodigy
Thanks for help.
Does bottom DAX expression look ok?
Somehow, I am getting the same amount as the amount I validate result from SQL.
Calculate(
sum (Table[AMOUNT]),
filter(
Table,
Table[CLASSID] = "100" &&
(left('Table'[ACCOUNTNO],1) IN {"4", "5"}) &&
not ( CONTAINSSTRING( 'Table'[ACCOUNTNO], "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ))
)