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.
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??
Solved! Go to Solution.
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)
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)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
88 | |
63 |