cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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!






New Animated Dashboard: Sales Calendar


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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors