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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Direct Query - OR() function don't exist

Hello,

 

I'm trying to do a simple OR() function using DIrect Query mode but it's not their. I found on the web that if I select "Allow unrestricted measures in DirectQuery mode." in Options -> Direct Query, this should resolve my problem, but this check box don't exist anymore.

 

Any ideas how to workaround this issue?

 

 

1 REPLY 1
TomMartens
Super User
Super User

Hey, 

 

you can use this

|| (two pipe signs) instead of OR and

&& instead of AND

This measure

Measure = 
CALCULATE(
    SUM('Table1'[value])
    , FILTER(
        'Table1'
        , 'Table1'[color] = "red" || 'Table1'[color] = "yellow"
    )
)

creates this:

image.png

Hopefully this is what you are looking for.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.