Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

DAX "NOT IN"

Hello ,

Im new to power bi,
can someone help me ?

How to filter using Not in ?Transposing.png

Thank you in advance,
Im having a hard time to solve it,
I will advance also..I dont like to subtract to get the output..
Thanks

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

You can find the pbix as attached. Also M code for your reference.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1YlWMgKTxmDSBEyagkkzMGkOJi2UYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"value", Int64.Type}}),
    #"Added Conditional Column" = Table.AddColumn(#"Changed Type", "Custom", each if [value] > 5 then "ok" else if [value] < 2 then "ok" else null)
in
    #"Added Conditional Column"

Capture.PNG

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

5 REPLIES 5
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

You need to place the NOT formula on the column and then use the in to make the level you need.

 

So you measure should look something like this:

MEASURE NOT IN =
CALCULATE (
    SUM ( Table1[Value] ),
    FILTER (
        Table1, NOT ( Table1[CAT LEVEL] ) IN { 2,3 }
    )
)

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
amitchandak
Super User
Super User

Typically for NOT In create an IN

not(brand in ('A','B'))

and use not on top of that

Anonymous
Not applicable

Good Day Sir,,
Thanks for your Feedback, Can you attached Some examples ?
Sorry for disturbing you

Hi @Anonymous ,

 

You can find the pbix as attached. Also M code for your reference.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1YlWMgKTxmDSBEyagkkzMGkOJi2UYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"value", Int64.Type}}),
    #"Added Conditional Column" = Table.AddColumn(#"Changed Type", "Custom", each if [value] > 5 then "ok" else if [value] < 2 then "ok" else null)
in
    #"Added Conditional Column"

Capture.PNG

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Stop posting useless files that do not help to answer the request.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.