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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
andreas789
Frequent Visitor

Equivalent of SQL - NOT EXISTS in calculated column

Hello there,

 

I have created a report that uses the products (items) table as fact table and supplier data as dimension tables, in order to find all non-available products on suppliers and change our availability flag.

I have used the measure below to get the availability flag of our system.

 

 

of = DISTINCT(items[AVAILABILITY_FLG])

 


I have also created a calculated column (on each supplier table) that will compare our & supplier's availability and if different, an action is displayed.

 

 

Action = SWITCH(TRUE(),
    [of] = Supplier1[Status], "OK",
    [of] <> Supplier1[Status], "CHANGE FLAG")

 


However, a supplier may remove discontinued products from his list and with the calculated column above, we lose that case. Is it possible to define that case as well?

In SQL a NOT EXISTS operator would probably solve the problem.

1 REPLY 1
v-henryk-mstf
Community Support
Community Support

Hi @andreas789 ,

 

The formulas created by dax and sql syntax have different calculation logic. Can you provide me with a screenshot describing this and test data so that I can answer your question as soon as possible?

How to Get Your Question Answered Quickly - Microsoft Power BI Community


Looking forward to your reply.


Best Regards,
Henry

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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