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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
smpa01
Super User
Super User

ANTI inside GENERATE?

Is it possible to factor an ANTI JOIN inside GENERATE. I am currently doing this

 

 

EVALUATE
VAR __fact =
    DATATABLE (
        "fact.fact", STRING,
        {
            { "a Messi" },
            { "aaa Messi" },
            { "ababa Pele" },
            { "ababan Diego" },
            { "xyz Crisitiano" },
            { "yyy Ronaldo" },
            { "Messi aaa" }
        }
    )
VAR __exec =
    DATATABLE (
        "exec.name", STRING,
        {
            { "Messi" },
            { "Crisitiano" },
            { "Ronaldo" }
        }
    )
VAR res =
    FILTER (
        __fact,
        NOT ( [fact.fact] )
            IN SUMMARIZE (
                GENERATE (
                    __exec,
                    FILTER (
                        __fact,
                        VAR one =
                            LEN ( [exec.name] )
                        VAR two =
                            RIGHT ( [fact.fact], one )
                        RETURN
                            two = [exec.name]
                    )
                ),
                [fact.fact]
            )
    )
RETURN
    res

 

 

 

I want to avoid

`FILTER(__fact, NOT ([fact.fact]) IN` if the ANTI can be factored inside the GENERATE itself?

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

How about this?

res =
FILTER (
    __fact,
    ISEMPTY (
        FILTER (
            __exec,
            RIGHT ( [fact.fact], LEN ( [exec.name] ) ) = [exec.name]
        )
    )
)

View solution in original post

1 REPLY 1
AlexisOlson
Super User
Super User

How about this?

res =
FILTER (
    __fact,
    ISEMPTY (
        FILTER (
            __exec,
            RIGHT ( [fact.fact], LEN ( [exec.name] ) ) = [exec.name]
        )
    )
)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.