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
Giorgi1989
Advocate II
Advocate II

Help needed with retrieving data from multiple fact tables for top customers

Dear All, 

 

I need to derive a list of top 20 customers based on the actual sales (Fact Table 1), and then return different numbers for those twenty customers from multiple fact tables (these are 3 different cubes from SAP Business Warehouse). 

 

So the output I want to arrive at eventually is something similar to the table shown below: 

 

Please, note that in the data model there are no direct relationships among these fact tables. 

 

Any suggestion as to how to get the desired output?  Thank you in advance. 

 

 Fact Table 1Fact Table 1Fact Table 1Fact Table 2Fact Table 3
CustomerSales 2019Sales 2020Sales 2021Bonuses 2021Forecast 2023
A500600700800900
B75085095010501150
C10001000100010001000
D20406080100
E1525354555
ETC.1213141516
1 REPLY 1
v-xiaotang
Community Support
Community Support

Hi @Giorgi1989 

Thanks for reaching out to us.

>> I need to derive a list of top 20 customers based on the actual sales (Fact Table 1), and then return different numbers for those twenty customers from multiple fact tables

you can first filter out the top 20 customers in Power Query by filtering the sales of each customer, then use Merge.

For example, to filter top 3 sales first, 

vxiaotang_0-1659073368392.png

vxiaotang_1-1659073425334.png

vxiaotang_2-1659073470346.png

then Merge

vxiaotang_3-1659073503391.png

vxiaotang_4-1659073550351.png

Finally expand table,

vxiaotang_5-1659073586542.png

 

Best Regards,

Community Support Team _Tang

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

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