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
questions
Helper I
Helper I

How to summarize data by calculating from another table?

I have few Master Tables as below:

 

1. Master Raw - Show invoice details (trade lane - From & to and  date)

questions_2-1592993416527.png

2. Estimate amount - Show the estimated amount of each invoice

questions_3-1592993451629.png

3. Split % - % of each of the sales for the trade lane under different period

questions_4-1592993480852.png

4. Actual Amount - actual amount of amounts by sales by week

questions_5-1592993506944.png

5. Week

questions_0-1592994229176.png

 

I can achieve to get the estimated & actual amount by trade lane (from, to)  by week easily by a matrix table as below:

questions_1-1592992788239.png

However, I want to achieve further show the volume by trade lane by week by sales (as below), can I write a measure or I would need to create a caculated column/table to capture?

 

questions_6-1592993915153.png

 

 

5 REPLIES 5
v-juanli-msft
Community Support
Community Support

Hi @questions 

In your "Split%"table create a "week" num column based on the "start date" or "end date" as you liked.

Then create a column to merge "week", "from", "to", "sales" in  "Split%"table,

in "Actual Amount" table, create a column to merge "week", "from", "to", "sales",

Next create a relationship between "Split%"table and "Actual Amount" table based on the columns created above.

Fianlly you can create "Sales return" to "Actual Amount" table.

But i don't know which columns used to create "Total amount".

 

If you need more details, could you share the examples in excel file or just paste your data here?

 

Best Regards

Maggie

amitchandak
Super User
Super User

@questions ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Here is the raw data in table format: @amitchandak 

 

1. Master Raw

Invoice no.FromToDateAmount
A123Hong KongNew York5-Jul-20100
B123Hong KongNew York10-Jul-20200
C123JapanShangai11-Jul-20100
D123JapanShangai12-Jul-20200
E123JapanShangai16-Jul-20100
A234Hong KongNew York5-Jul-20300
B234Hong KongNew York10-Jul-20100
C234Hong KongNew York12-Jul-20100
D234Hong KongNew York16-Jul-20100
E234Hong KongNew York18-Jul-20200
F123Hong KongSingapore5-Jul-20500

 

2.Estimated Amount

Invoice no.Estimated Amount
A123100
B123200
C123100
D123200
E123100
A234300
B234100
C234100
D234100
E234200
F123500

 

3.Split %

FromToSalesSales ReturnEffective Start Date Effective End Date 
Hong KongNew YorkAndy30%5-Jul-2011-Jul-20
Hong KongNew YorkTom70%5-Jul-2011-Jul-20
Hong KongNew YorkAndy20%12-Jul-2018-Jul-20
Hong KongNew YorkTom80%12-Jul-2018-Jul-20
JapanShangaiIvy50%5-Jul-2011-Jul-20
JapanShangaiJess30%5-Jul-2011-Jul-20
JapanShangaiMandy20%5-Jul-2011-Jul-20
JapanShangaiIvy60%12-Jul-2018-Jul-20
JapanShangaiMandy40%12-Jul-2018-Jul-20

 

4. Actual Amount

WeekSalesActual AmountFrom To
28Andy50Hong Kong New York
28Andy50Hong Kong New York
28Andy100Hong Kong New York
28Tom50Hong Kong New York
28Tom50Hong Kong New York
28Tom50Hong Kong New York
28Ivy100Hong Kong Singapore
28Ivy50Hong Kong Singapore
28Ivy300Hong Kong Singapore
28Jess150JapanShanghai
28Jess50JapanShanghai
28Mandy200JapanShanghai
28Mandy80JapanShanghai
29Tom150Hong Kong New York
29Tom150Hong Kong New York
29Tom50Hong Kong New York
29Ivy80Hong Kong New York
29Ivy100Hong Kong New York
29Jess180JapanShanghai
29Mandy200JapanShanghai

 

5. Week

DateWeek
5-Jul-2028
6-Jul-2028
7-Jul-2028
8-Jul-2028
9-Jul-2028
10-Jul-2028
11-Jul-2028
12-Jul-2029
13-Jul-2029
14-Jul-2029
15-Jul-2029
16-Jul-2029
17-Jul-2029
18-Jul-2029

My goal is to show both forecasted Sales & Actual sales together into 1 table + the % of difference.

How can I eventually showing two in one?

 

questions_0-1593162624148.png

 

Hi @questions 

I have problems creating "Forecast sales" as shown.

Could you show the relationship among your tables?

 

Best Regards

Maggie

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.