Forum Discussion

ce138867's avatar
ce138867
Resolver II
3 years ago
Solved

Using CONCATENATEX with FILTERS

I've been reviewing previous posts about using CONCATENATEX with FILTERS and I'm seeing different answers to either create a Measure or a new column. I want to create a new Measure so that it can be displayed as a Card based on a page filter. 

 

  • The page filter can be set for an organization
  • Based on filters in the same table, concatenate the values into one string
  • The Measure is one of multiple that is being created to show different pieces of data separately

I was getting an error previously that stated: "A table of multiple values was supplied where a single value was expected." I've been playing with this measure for awhile and wondering if anyone has any recommendations.

With the below query, I'm now getting "Too many arguments were passed to the FILTERS function. The maximum argument count for the function is 1."

Basically if the below filters are applied, I want to display the values from the Vendor Column in this Hosp_Tech table as one string. E.g. if it's Tmobile and Sprint, I want the measure to output both so I can pull into a Card visual.

 
WC =
CONCATENATEX (
    summarize(
        filters(
            Hosp_Tech, Hospital_Tech[CATEGORY] = "IS Infrastructure - Software"
            && Hospital_Tech[TECHNOLOGY] = "Wireless Carrier")
)
)

Thanks in advance.

  • Hi ce138867 

     

    You can try this measure

    Vendors = 
    CONCATENATEX (
        FILTER (
            'Hospital_Tech',
            'Hospital_Tech'[Category] = "IS Infrastructure - Software"
                && 'Hospital_Tech'[Technology] = "Wireless Carrier"
        ),
        'Hospital_Tech'[Vendor],
        "; "
    )
    

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

3 Replies

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi ce138867 

     

    You can try this measure

    Vendors = 
    CONCATENATEX (
        FILTER (
            'Hospital_Tech',
            'Hospital_Tech'[Category] = "IS Infrastructure - Software"
                && 'Hospital_Tech'[Technology] = "Wireless Carrier"
        ),
        'Hospital_Tech'[Vendor],
        "; "
    )
    

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

    • ce138867's avatar
      ce138867
      Resolver II

      Thanks v-jingzhang , your solution allowed me to remove the visual filter. One additional question if I may. I noticed that this gives me a concatenated list, but I'm seeing duplicates. When I try the below using DISTINCT, I'm still getting the same exact list as without using DISTINCT. Am I using DISTINCT incorrectly here? There were no errors that showed up.

       

      Vendors = CONCATENATEX(

      DISTINCT(

      FILTER ( 'Hospital_Tech', 'Hospital_Tech'[Category] = "IS Infrastructure - Software" && 'Hospital_Tech'[Technology] = "Wireless Carrier" )), 'Hospital_Tech'[Vendor], "; " )