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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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