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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
irnm8dn
Post Prodigy
Post Prodigy

VOID

...

5 REPLIES 5
ricardocamargos
Continued Contributor
Continued Contributor

Hi @irnm8dn,

 

You can use the merge (left join) function in Power Query. When the right side is null it`s available.

 

Let me know if u need some help.

 

Thanks,

 

Ricardo

Thanks Ricardo.

 

Yes, I think I will need more detail.

 

I have seen other functions here, but can't seem to get them to work.

 

https://community.powerbi.com/t5/Desktop/DAX-query-to-compare-a-value-in-one-table-to-see-if-it-exis...

@irnm8dn,

 

https://docs.microsoft.com/en-us/power-bi/desktop-shape-and-combine-data

 

You just need to merge the datasets using the left join.

 

If u wanna use DAX u can use the function EXCEPT:

 

https://www.tutorialspoint.com/dax_functions/dax_except_function.htm

 

Thanks,

 

Ricardo

@ricardocamargos

 

Veing a less sophistocated user and a bit of a newb, I used the following statement:

 

Column = CONTAINS(Table2, Table2[Value], Table1[Value])

 

This creates a True/Flase value.  I change the value to text, and wrote an if statment that returns a vaule of Sold or Available.  Not ideal - but functional.

 

What would you recommend at the easiest way to apply a DAX statement that returns a desired value i.e. Sold or Available, when an ID matches or not from two tables?

 

Thanks.

@irnm8dn,

 

You can create a measure using the EXCEPT function, passing que ID`s. 

Sold = VAR tbl1 = SELECTCOLUMNS(TABLE_1, "ID")

VAR tbl2 = SELECTCOLUMNS(TABLE_2, "ID")

VAR tbl = EXCEPT(tbl1; tbl2)

RETURN

    COUNTX(tbl; ID)

 

Using this measure in a table you can visualize if it`s available or not, it will return 0 or non 0;

 

Thanks,

 

Ricardo

 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.