Forum Discussion

EZimmet's avatar
EZimmet
Resolver I
3 years ago
Solved

Looking for correct syntax please to pull multiple records

Looking for correct syntax please I originally was only pulling 1 location full working code below. Now need to alter the code to pull 3 specific locations from a region that has 10 locations into ...
  • v-yueyunzh-msft's avatar
    3 years ago

    Hi , EZimmet 

    According to your description, you want to how to add a Contains statement for the '_Rack Metrics Report'[Site] ?

    If this you can try to use "in" operator in dax code, like this:

    VAR _count =

        COUNTX ( FILTER ( ( '_Rack Metrics Report' ),'_Rack Metrics Report'[Site] in { "LOC1","LOC2","LOC3"}),[Site] )

     

     

     

     

    If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly