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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Bderi
Frequent Visitor

DAX: Returning information on two (or more) matching items in a single column

Hi,  in PowerPivot, I am struggling to find information on matching values in the same column.

 

I would like to display the matching name in the below table, e.g. for John with ID '1' it would be Peter (also with ID '1'), for Jack (ID '2') it would be Mary (also ID '2'), etc.

 

I have been able to 1) find the number of occurrences using:

=COUNTX(FILTER (Table2, (EARLIER ( [ID] ) = [ID] )),Table2[Name])

 

...also, I was able to add up the matching values with

 

=SUMX(FILTER (Table2, (EARLIER ( [ID] ) = [ID] )),Table2[Name])

 

...but was unable to display 'Peter' in the row of 'John' and 'John' in the row of Peter. I am assuming it is possible, not sure how...any help would be much appreciated

 

Snip.JPG

2 ACCEPTED SOLUTIONS
TomMartens
Super User
Super User

Hey,

 

I would give CONCATENATEX a try, basically it's the same as your SUMX formula,

In addition to that, you can adjust the expression part to return BLANK if the current name matches the nema from the iteration, but this would also miss the chance to catch 2 different John(s).

 

Hopefully this gives you an idea!

 

Regards,
Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

Hey,

 

unfortunately there is no official group of these X functions, within books these functions are grouped with some others to "table iterators".

 

Besides SUMX and CONCATENATEX you will find some others from the offical documentation under "statistical functions":
https://msdn.microsoft.com/en-us/query-bi/dax/statistical-functions-dax

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

4 REPLIES 4
TomMartens
Super User
Super User

Hey,

 

I would give CONCATENATEX a try, basically it's the same as your SUMX formula,

In addition to that, you can adjust the expression part to return BLANK if the current name matches the nema from the iteration, but this would also miss the chance to catch 2 different John(s).

 

Hopefully this gives you an idea!

 

Regards,
Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Amazing ,Tom, this is exactly what I was looking for! Thanks very much! Smiley Happy 

 

Actually, before posting, I tried looking up other forms of X-formulas (SUMX, COUNTX), but did not find "CONCATENATEX" - is there a list of these somewhere? Does this group of formulas have a specific name? Thank again! 

Hey,

 

unfortunately there is no official group of these X functions, within books these functions are grouped with some others to "table iterators".

 

Besides SUMX and CONCATENATEX you will find some others from the offical documentation under "statistical functions":
https://msdn.microsoft.com/en-us/query-bi/dax/statistical-functions-dax

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Thanks for your kind help, Tom!

 

Greetings to Hambug!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors