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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
D_PBI
Post Partisan
Post Partisan

A function 'FILTER' has been used in a True/False expression that is used as a table filter - error

Hi,
I'm attempting to create a calculated table based on the following logic. I'm getting the A function 'FILTER' has been used in a True/False expression that is used as a table filter expression. This is not allowed. error.
D_PBI_0-1749490928203.png

Please can someone inform on what the issue is and what I need to change to replicate the same aim?  Thanks.

 

1 ACCEPTED SOLUTION
SamsonTruong
Super User
Super User

Hi @D_PBI ,

The error is stemming from this section of your DAX:

SamsonTruong_0-1749493216196.png


The OR() function expects logical comparions as arguments where in your first argument in the OR() function, you are passing a table. Based on my assumption of your desired output, please try the following DAX for your calculated table. Please also make sure to replace the tables and fields names with your actual table and field names:

VAR _Licences =
CALCULATETABLE (
    FILTER (
        agreement,
        USERELATIONSHIP (_dimDate[Date], agreement[Termination Date])
        &&
        USERELATIONSHIP (_dimDate[Date], agreement[Execution Date])
        &&
        _dimDate[Date] >= _MinDate
        &&
        _dimDate[Date] <= _MaxDate
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        agreement[AUTH Categorization(autmcategorization)] = 200000000
    )
)

 
Please let me know if this achieves your desired result or if I misunderstood your goal with the calculated table.

If this helped, please mark it as the solution so others can benefit too. And if you found it useful, kudos are always appreciated.

Thanks,

Samson

 

Connect with me on LinkedIn

Check out my Blog

Going to the European Microsoft Fabric Community Conference? Check out my Session

View solution in original post

5 REPLIES 5
v-priyankata
Community Support
Community Support

Hi @D_PBI 

May I ask if you have resolved this issue? @SamsonTruong @hnguy71 thanks for your inputs, @D_PBI  please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

Hi @D_PBI 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. we’ll be happy to assist.

Hi @D_PBI 

Hope everything’s going smoothly on your end. We haven’t heard back from you, so I wanted to check if the issue got sorted. If yes, marking the solution would be awesome for others who might run into the same thing.

SamsonTruong
Super User
Super User

Hi @D_PBI ,

The error is stemming from this section of your DAX:

SamsonTruong_0-1749493216196.png


The OR() function expects logical comparions as arguments where in your first argument in the OR() function, you are passing a table. Based on my assumption of your desired output, please try the following DAX for your calculated table. Please also make sure to replace the tables and fields names with your actual table and field names:

VAR _Licences =
CALCULATETABLE (
    FILTER (
        agreement,
        USERELATIONSHIP (_dimDate[Date], agreement[Termination Date])
        &&
        USERELATIONSHIP (_dimDate[Date], agreement[Execution Date])
        &&
        _dimDate[Date] >= _MinDate
        &&
        _dimDate[Date] <= _MaxDate
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        NOT CONTAINSSTRING(UPPER(agreement[Agreement Status]), "Text")
        &&
        agreement[AUTH Categorization(autmcategorization)] = 200000000
    )
)

 
Please let me know if this achieves your desired result or if I misunderstood your goal with the calculated table.

If this helped, please mark it as the solution so others can benefit too. And if you found it useful, kudos are always appreciated.

Thanks,

Samson

 

Connect with me on LinkedIn

Check out my Blog

Going to the European Microsoft Fabric Community Conference? Check out my Session

hnguy71
Super User
Super User

Hi @D_PBI ,

you can drop the FILTER clause, not required. Instead I would simplify it to something like this instead:

__dimDate[Date] >= _MinDate || __dimDate[Date] <= _MaxDate

 

Also, you can remove the UPPER as DAX is case-insensitive.



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors