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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.