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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

SQL join in Power Bi with DAX

I want to create a table  like in the picture below. Same rows of table A and B should't be in the new table.

dmilardo_au_0-1686576767682.png

 

4 REPLIES 4
Anonymous
Not applicable

Sorry, but that's not what I meant. I try to describe it in a other way.

I want to realise a SQL join of two tables with DAX.

I have two tables, tabel A and B. Both have the same columns-structure.

 

Some of the rows of table B can be found in table A. 

I want to get a new table that has all the rows of table A minus the rows that can be found in table B.

 

Like in the picture of the first post to see, i only want the red part in my new table.

dmilardo_au_0-1686732902957.png

 

Anonymous
Not applicable

I need to create legend for a dot-plot. 

I have a table with columns: rivet_points | result_id | machine_classification | ....

One rivet_point can have multible result_id's.

My database gives every result_id a machine_classification (0 or 1) and I need for every last id of every rivet_point a new machine_classification (for example 2).

So that I can colour the dot-plot with machine_classification and get to see the last result_id's.

 

At the moment I have a table with all last result_id's. But if I create a new table with the function UNION I get dublicates of all the rows with these result_id's.

 

Table "last_results" with all last result_id's to every rivet_point:

last_results =
ADDCOLUMNS (
    SUMMARIZE ( result, result[rivet_points]),
    "result_id", CALCULATE ( MAX ( result[result_id] ) )
)
("result_id", "result_id" and mc are inplemnted by hand)

dmilardo_au_0-1686578402448.png

 

I wanted to creste a seprate table in which all the last result_id's don't exist so I can use the function UNION again and get a table in which these result_id's have a different machine_classificaton.

 

aj1973
Community Champion
Community Champion

 @Anonymous 

Am not sure to understand your model, but are trying to add a column(result_id) to your Summarized table and you want to select the Null Value of machine_classification !

If so then I think you need to add a filter context to your CALCULATE ( MAX ( result[result_id] ) ) by machine_classification = 0

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

aj1973
Community Champion
Community Champion

Hi @Anonymous 

You need to be more precise in your thread, but in Power Query you can achieve that 

aj1973_0-1686577185700.png

Use Merge Queries.

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.