Forum Discussion

4pepesanchez4's avatar
4pepesanchez4
Frequent Visitor
4 years ago
Solved

search for a value and return multiple fields

Good afternoon:

 

First of all, thank the people who answer it. What i need to do is the following:

 

If they match a field (country) return me ALL the fields that meet the condition (city)

 

 

Thank you very much in advance,

Greetings.

 

  • Hi 4pepesanchez4 
    You can use a table or matrix visual

    Measure 

    Cities = 
    CONCATENATEX (
        Countries,
        Countries[city],
        " | "
    )
  • tamerj1's avatar
    tamerj1
    4 years ago

    Hi 4pepesanchez4 
    Please use this

    Cities = 
    CONCATENATEX (
        Ventas_Compana_Google,
        Ventas_Compana_Google[Descripcion],
        " | "
    )

11 Replies

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi 4pepesanchez4 
    You can use a table or matrix visual

    Measure 

    Cities = 
    CONCATENATEX (
        Countries,
        Countries[city],
        " | "
    )
      • 4pepesanchez4's avatar
        4pepesanchez4
        Frequent Visitor

        I'm sorry for my level of English. What I wanted to say is that the definition proposal is through a DAX formula (CalculateX) and I'm using Excel, which doesn't give me the option to use that formula, right? Wouldn't there be another way to do the exercise without DAX formulas?

         

        Thx

  • 4pepesanchez4's avatar
    4pepesanchez4
    Frequent Visitor

    HI tamerj1 !

     

    How should I write the formula in Power Pivot knowing that the relationship between countries and tables is already done and that Country is in a different table than city?

    • Country = Nombre y clienta (Related to each other)
    • City = description field

     

    The formula?

     

    Thanx you a lot!!

     

     

     

     

     

     

     

     

     

     

    • tamerj1's avatar
      tamerj1
      Community Champion

      Hi 4pepesanchez4 

      just change the table name to the cities table

       

      Cities = 
      CONCATENATEX (
          Cities,
          Cities[city],
          " | "
      )

       

       
      • 4pepesanchez4's avatar
        4pepesanchez4
        Frequent Visitor

        hi again šŸ˜… tamerj1 

         

        Could you help me understand why the formula gives me an error? The first field that the formula asks me for is the table (Ventas_Clientas_Origen), the expression (Nombre), Order by Expression ('Ventas_Campaña_Google'[Descripción]).

         

        * My goal is to get the names of the clients related to the table (one-to-many relationship) to return all the services performed by said clients.

         

        Thx a lot!!