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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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