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
ehwood
Regular Visitor

Re-organizing Info Based on Criteria

Hello PBI Community,

 

So I'm having trouble finding a solution to this issue. My data comes in the form of Table 1. Orders with multiple components are split into seperate lines. In this example, only product A is a regular product and everything else you can only purchase along side product A (or you can purchase product A alone).

 

Table 1:

.PBIQ2.1.PNG

 

I want to use this data to fill a newly created Table 2. The goal is to identify the main product and subsequent "add-ons".

I have Order_Id and Product Name already completed in Table 2, but cannot list the add-ons. Here's an example of what I'm trying to get to.

 

Table 2: (GOAL)

PBIQ2.2.PNG

 

I've messed with a formula like....

 

Add-On 1 = CALCULATE(MAXX(RELATEDTABLE('Orders'),'CD: Orders'[product_name]),

'CD: Orders'[product_id] <> 0,
)

 

... but I don't think it's the right way to think about the issue and I don't know how to pull the subsequent add-ons. Maybe it has something to do with the RANK function?

 

Anyways, if anyone could advise , I would appreciate it greatly.

 

Thanks,

Ehwood

 

 

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

Here is the result i got.  You may download the PBI file from here.

 

Untitled.png


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

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

 

Here is the result i got.  You may download the PBI file from here.

 

Untitled.png


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

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.