Forum Discussion
NOT IN dax showing wrong counts
I am trying to write a DAX statement for NOT IN but i don't know the syntax for it. It's like:
Hi, Anonymous ;
You could change to it.
q = DIVIDE ( CALCULATE ( SUM ( C[T_S] ), FILTER ( C, NOT ( C[S] ) IN { "C", "V", "D", "C" } ) ), SUM ( T_D[T_S] ) )
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
7 Replies
- amitchandak
Super User
Anonymous , Try like
CALCULATE(sum(C[T_S]), Filter(C, not( C[S] in {"C" ,V","D","C"} ) ) )
- AnonymousNot applicable
I tried to put the formula but it says "too few arguments were passed to the divide function. thhe minimum argument count for the functions is 2".
DIVIDE(CALCULATE(sum(C[T_S]), Filter(C, not( C[S] in {"C" ,"V","D","C"}))))not sure, where i am wrong.- rohit_singh
Solution Sage
Hi Anonymous,
You have missed out argument 2 in the DIVIDE function. You have only specified the numerator in the function.
DIVIDE(CALCULATE(sum(C[T_S]), Filter(C, not( C[S] in {"C" ,"V","D","C"}))) , ____ )If this solves your issue, please mark amitchandak 's answer as the solution to help others too.
Kind regards,
Rohit
Appreciate your kudos! 😊
- AnonymousNot applicable
So, I wrote the denominator but the power bi is saying that "Operator or expression '( )' is not supported in this context."
The italic, underline part is showing error as: "Operator or expression '( )' is not supported in this context."
DIVIDE(CALCULATE(sum(C[T_S]), Filter(C, not(C[S] in {"C" ,"V","D","C"},SUM(T_D[T_S]),0)))) - Ashish_Mathur
Super User
Hi,
Replace || with &&. Remove the redundant condition - C[S]<>"C"
- AnonymousNot applicable
so, I wrote the denominator but the power bi is saying that "Operator or expression '( )' is not supported in this context."
The italic, underline part is showing error as: "Operator or expression '( )' is not supported in this context."
DIVIDE(CALCULATE(sum(C[T_S]), Filter(C, not(C[S] in {"C" ,"V","D","C"},SUM(T_D[T_S]),0))))
- v-yalanwu-msft
Community Support
Hi, Anonymous ;
You could change to it.
q = DIVIDE ( CALCULATE ( SUM ( C[T_S] ), FILTER ( C, NOT ( C[S] ) IN { "C", "V", "D", "C" } ) ), SUM ( T_D[T_S] ) )
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.