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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
EZimmet
Resolver I
Resolver I

Assistance with syntax to include multiple values from same column

Assistance with syntax to include multiple values from same column

 

VAR DC_Data =

COUNTROWS ( FILTER ( FILTER ( FILTER ( FILTER (

   'Power Pull',

   'Power Pull'[DC] = "AZ" ),

    NOT CONTAINSSTRING('Power Pull'[Outbound] , "Note*")),

 

--   -------  Need to include all of the below any of the below values would need to be pulled if found  

--  -----------Since it's all the same column is there a inlist contains statment that can be used  ?

 

   'Power Pull'[EQType] = "Smart PDU"         ||

   'Power Pull'[EQType] = "PDU"                       ||

   'Power Pull'[EQType] = "MainFrame"         ||

   'Power Pull'[EQType] = "Sensor"                  ||

   'Power Pull'[EQType] = "Storage"                 ||

   'Power Pull'[EQType] = "Storage Frame"  )),

 

   'Power Pull'[DisplayLabel] = "Live"  ))

-- ----------------------------

RETURN

 SWITCH (

 TRUE (),

     MAX ( 'Metrics- Site'[Expected] ) = "DC",   DC_Data +0

)

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @EZimmet  - Instead, it's best to use a single FILTER with IN for multiple values, which makes it cleaner and more efficient.

VAR DC_Data =
COUNTROWS (
FILTER (
'Power Pull',
'Power Pull'[DC] = "AZ" &&
NOT CONTAINSSTRING ( 'Power Pull'[Outbound], "Note*" ) &&
'Power Pull'[EQType] IN { "Smart PDU", "PDU", "MainFrame", "Sensor", "Storage", "Storage Frame" } &&
'Power Pull'[DisplayLabel] = "Live"
)
)

RETURN
SWITCH (
TRUE(),
MAX ( 'Metrics- Site'[Expected] ) = "DC", DC_Data + 0
)

 

hope this works. please check





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
EZimmet
Resolver I
Resolver I

Fantastic Thank you that did the trick 

rajendraongole1
Super User
Super User

Hi @EZimmet  - Instead, it's best to use a single FILTER with IN for multiple values, which makes it cleaner and more efficient.

VAR DC_Data =
COUNTROWS (
FILTER (
'Power Pull',
'Power Pull'[DC] = "AZ" &&
NOT CONTAINSSTRING ( 'Power Pull'[Outbound], "Note*" ) &&
'Power Pull'[EQType] IN { "Smart PDU", "PDU", "MainFrame", "Sensor", "Storage", "Storage Frame" } &&
'Power Pull'[DisplayLabel] = "Live"
)
)

RETURN
SWITCH (
TRUE(),
MAX ( 'Metrics- Site'[Expected] ) = "DC", DC_Data + 0
)

 

hope this works. please check





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors