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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
dw700d
Post Patron
Post Patron

Identifying a value that contains a specific value in another column

Good day, I have a purchase order column with thousands of purchase orders. each purchase order has  various accounts associated with it. I would like a measure that allows me to identify any purchase order that contains Account ABC.  My objective is to be able to view all the accounts affiliated with any purchase order that has an account ABC.  For example the measure would return "Purchase No" 1 because it contains ABC but it would also show me Account WES as well.

 

Purchase No

Account
1ABC
1WES
2ABC
2DFG
3LOM
3NED
4ABC
4YUU
5LOE
5NSA
6ERR
6FRR
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @dw700d ,

Please have a try.

Create a measure.

Measure = 
var connect = CONCATENATEX(FILTER(ALL('Table'),'Table'[Purchase No]=SELECTEDVALUE('Table'[Purchase No])),'Table'[Account]&" ")
VAR RESULT = IF(SELECTEDVALUE('Table'[Account])="ABC",connect,BLANK())
return RESULT

11.PNG

Best Regards

Community Support Team _ Polly

 

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

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @dw700d ,

Please have a try.

Create a measure.

Measure = 
var connect = CONCATENATEX(FILTER(ALL('Table'),'Table'[Purchase No]=SELECTEDVALUE('Table'[Purchase No])),'Table'[Account]&" ")
VAR RESULT = IF(SELECTEDVALUE('Table'[Account])="ABC",connect,BLANK())
return RESULT

11.PNG

Best Regards

Community Support Team _ Polly

 

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

Anonymous
Not applicable

Hello @dw700d ,

 

MuskanAgarwal_1-1639199377261.png

 

Is the above table you are expecting as a output.

Please let me know so that I can share the way I have achieved this.

 

Ashish_Mathur
Super User
Super User

Hi,

What end result are you expecting?  Please show that clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
parry2k
Super User
Super User

@dw700d recently solved similar request, check this post. Solved: Re: Filter a table by Slicer value and return all ... - Microsoft Power BI Community and it also has a pbix attachment, you can tweak it as you see fit.

 

Follow us on LinkedIn

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

VijayP
Super User
Super User

@dw700d 

I think there are ways . 
1. you can use the filter pane and in the visual filter select only abc from Account Field which shows only POs pertains to ABC.
2. Also you can create a Slicer of all accounts and select ABC to show only Purchase orders of ABC.
If you have already know about it, please let what is should be the final outcome as snapshot to explain better




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors