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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
4pepesanchez4
Frequent Visitor

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)

 

4pepesanchez4_0-1653030425988.png

 

Thank you very much in advance,

Greetings.

 

2 ACCEPTED SOLUTIONS
tamerj1
Super User
Super User

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

1.png

Measure 

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

View solution in original post

Hi @4pepesanchez4 
Please use this

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

View solution in original post

11 REPLIES 11
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

4pepesanchez4_3-1653217032428.png

 

The formula?

 

4pepesanchez4_5-1653217129580.png

Thanx you a lot!!

 

 

 

 

 

 

 

 

 

 

Hi @4pepesanchez4 

just change the table name to the cities table

 

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

 

 

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!! 

 

 

4pepesanchez4_0-1653291642945.png

 

 

 

Which one is the many side? What is the code for the measure [Nombre]?

The field “Clienta” (severals) and field “Name” (single) is the active relationship between tables.

 

In the table of the "Clienta" field I have all the services that the clients have performed in the month (each service is a line so there are repeated lines) and in the second table the field "Name" are the clients that have come through from Google so it is a unique field.

 

 I do not have the "Name" field defined as any measure. It is simply the unique name of each client and what I want it to return is the "Description" field of the table (Ventas_Camapaña_Google) to know what services those clients have performed.

 

4pepesanchez4_0-1653295180894.png

Hi @4pepesanchez4 
Please use this

Cities = 
CONCATENATEX (
    Ventas_Compana_Google,
    Ventas_Compana_Google[Descripcion],
    " | "
)
4pepesanchez4
Frequent Visitor

What if I had to do it in Excel without DAX formulas? 

 

Thx a lot!

@4pepesanchez4  😅
Yes why not. It is for sure the easiest way.

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 
It is CONCATENATEX not CALCULATEX
and it is available in Excel's Power Pivot. It should work normally with no issues.

tamerj1
Super User
Super User

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

1.png

Measure 

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.