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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Robert4049
Frequent Visitor

Array Filter

SecondDueService =
VAR Seconds = 560
VAR Units = { 12, 71 }
RETURN
    IF (
        COUNTAX (
            FILTER (
                'AGENCY EXPOSURE APPARATUSES',
                'AGENCY EXPOSURE APPARATUSES'[ResponseTimeSeconds] = Seconds
                    && 'AGENCY EXPOSURE APPARATUSES'[apparatusTypeID] = Units
            ),
            'AGENCY EXPOSURE APPARATUSES'[ResponseTime]
        ) >= 1,
        TRUE (),
        FALSE ()
    )

Hey Everyone,

I'm trying to do the above but I cannot use an array in a filter. Is there another methodology someone could suggest that would have the same effect aside from doing several and/or's??

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

So if you just want to filter for rows where the units are either 12 or 71 then just change this line

  

&& 'AGENCY EXPOSURE APPARATUSES'[apparatusTypeID] = Units

to use the IN operator:

&& 'AGENCY EXPOSURE APPARATUSES'[apparatusTypeID] IN Units

PS. techincally in DAX the { } syntax is a table constructor, so what you have is a single column table not an array (but that is just semantics, functionally it operates similar to an array)

View solution in original post

1 REPLY 1
d_gosbell
Super User
Super User

So if you just want to filter for rows where the units are either 12 or 71 then just change this line

  

&& 'AGENCY EXPOSURE APPARATUSES'[apparatusTypeID] = Units

to use the IN operator:

&& 'AGENCY EXPOSURE APPARATUSES'[apparatusTypeID] IN Units

PS. techincally in DAX the { } syntax is a table constructor, so what you have is a single column table not an array (but that is just semantics, functionally it operates similar to an array)

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.