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 August 31st. Request your voucher.

Reply
LaurensM03
New Member

Filter a table based on measure with multiple OR's

Dear all,

 

I am trying to filter a table based on the measure pasted below. A row from the table 'sheet1' should be shown in the table if:

  • the column 'parent link' contains the string as defined AND
    • the column 'CRA intake status' equals "To Do" OR
    • the column 'Eligible for Capitalisation' equals "No" or is blank OR
    • the column 'Solution Intent status' equals "To Do" or "Undefined".

This code gives me the following error 'The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.' and I don't know how to solve it. Could anyone help out?

 

 

Filter missing requirements =
VAR MTMB = "ABN-1095"
VAR Filtermissing =
    FILTER('Sheet1',
        CONTAINSSTRING('Sheet1'[Parent Link], MTMB) &&
        'Sheet1'[CRA Intake Status] = "To Do" ||
        'Sheet1'[Eligible for Capitalisation] = "No" ||
        ISBLANK('Sheet1'[Eligible for Capitalisation]) ||
        'Sheet1'[Solution Intent status] = "Undefined" ||
        'Sheet1'[Solution Intent status] = "To Do"
        )

RETURN
Filtermissing
10 REPLIES 10
Igna
Resolver III
Resolver III

Hi,

 

Can you try like this ?

 

Filter missing requirements =
VAR MTMB = "ABN-1095"
VAR Filtermissing =
    FILTER('Sheet1',
        CONTAINSSTRING('Sheet1'[Parent Link], MTMB) &&
        (
            'Sheet1'[CRA Intake Status] = "To Do" ||
            'Sheet1'[Eligible for Capitalisation] = "No" ||
            ISBLANK('Sheet1'[Eligible for Capitalisation]) ||
            'Sheet1'[Solution Intent status] = "Undefined" ||
            'Sheet1'[Solution Intent status] = "To Do"
        )
    )
RETURN
Filtermissing

 

Hope it helps

 

Igna

Hi Igna,

 

Thanks, unfortunately I still receive an error. I attached the source files to the comment of Ahmedx

Ahmedx
Super User
Super User

but a measure cannot be a table, did you create a measure?

write like this and select 1

Screenshot_1.png

 

Filter missing requirements =
VAR MTMB = "ABN-1095"
VAR Filtermissing =
    FILTER('Sheet1',
        CONTAINSSTRING('Sheet1'[Parent Link], MTMB) &&
        'Sheet1'[CRA Intake Status] = "To Do" ||
        'Sheet1'[Eligible for Capitalisation] = "No" ||
        ISBLANK('Sheet1'[Eligible for Capitalisation]) ||
        'Sheet1'[Solution Intent status] = "Undefined" ||
        'Sheet1'[Solution Intent status] = "To Do"
        )

RETURN
if ( COUNTROWS(Filtermissing)>1,1,0)

 

 

Thank you

it was the right decision, if so then you will accept it as a decision?

Hi, I created a measure to use as a filter in the filter pane applying it to a table visual.

 

Ahmedx
Super User
Super User

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

and expected output!

In this dummy file I forgot to change the following in the above code:
The second line "ABN-1095" should be replaced with "Theme 1"

I attached both files via a wetransfer link.https://we.tl/t-q6Uxg6F1SV 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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