Forum Discussion

questions's avatar
questions
Icon for Helper I rankHelper I
6 years ago

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)

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

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

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

5. Week

 

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

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?

 

 

 

5 Replies

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

    • questions's avatar
      questions
      Icon for Helper I rankHelper I

      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
      • questions's avatar
        questions
        Icon for Helper I rankHelper I

        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?

         

         

  • v-juanli-msft's avatar
    v-juanli-msft
    Icon for Community Support rankCommunity 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