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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
louisk
Frequent Visitor

Get all ids that have the same attributes as the selected id

Hello,

 

i am struggling with the below.

I have a table with Ids, another one for each Id all the items purchased and a third one: Id and corresponding sales.

 

I would like to when selecting a certain Id to get all the ids and sales that have purchased one or more item as the selected Id.

image.pngimage.png

4 REPLIES 4
parry2k
Super User
Super User

@louisk what you want the output to looks like? If one id has two items, do you want sales to be repeated twice.



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.

and this is the correct relationship. @parry2k image.png

louisk
Frequent Visitor

Updated:

 

So basically: I have 3 tables:
  •  Ids:  containing: Id, name, DOB
  • Purchases: Containing Id, Purchases
  • Sales: containing: Id, Sales
 
What I would like to have is , when choosing a certain Id. for example Louis (Id1):
  1. Display all Names that have purchased one or more items similar to Louis purchases. In this case it will display: Bouchra, Louis, Ralph, Ziad
  2. Display all the names that have the same DOB as Louis. In this case it will display: Louis, Ziad
  3. Display all the sales that are 30% less or more than Louis sales. It should display: Louis, Violet, Ariane, Bouchra, Elias
I have managed in a way to make point 1 and 2 work, by creating a temporary concatenated table which concatenates all attributes.
And hence, when selecting a certain Id, it will put it in a temp table : selected Ids, and lookup all its attributes.
Point 3 is not working properly. so the formula needs to be adjusted.
Also, I would like to have a slicer that will allow us to select: Yes / No instead of putting them in the filter pane. But teh slicer cannot take a measure. hence I don't know how to do it.
 
 
 

Hello. This is is the output I would like to have.

image.png

so basicallu if I choose id=1, it needs to go to the table purchases and get me all Ids that have one or more items purchased same as Id 1 and then display them as unique values along with their sales

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors