Forum Discussion

abrother's avatar
abrother
Frequent Visitor
1 year ago
Solved

Matrix Row Subtotals Based on Variable Data

Hi all, I'm trying to build out a revenue report based on SKU, Customer, and the number of units each customer ordered using a matrix so I can drill down to the S/N level for each customer. The issue I'm having is that different customers have different pricing for the same SKU and my subtotals in the matrix aren't working correctly.

 

I have production data that shows each SKU and S/N in one table and I have another table that has pricing for each SKU by customer. Currently the "Revenue" column is set to Sum of Revenue.

 

Here's what I want to have:

 

Each customer should be subtotaled based on the unit price of each S/N and then the SKU level should total the Customer subtotals. Unfortunately I'm getting:

 

 

Basically it's seeing the correct pricing per customer, but for whatever reason it's not summing the Customer subtotal or SKU totals correctly. Any help would be appreciated.

 

4 Replies

  • Hi abrother 

    Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
    Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
    Please show the expected outcome based on the sample data you provided.

    Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
    Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

  • abrother's avatar
    abrother
    Frequent Visitor

    Hi Ritaf1983 I've inserted tables for the items I'm talking about below. I've also added the tables seen in the screenshots in my original message. Let me know if there are other questions about these to get to an answer.

     

    Customer Pricing:

    Item NumberCustomer NameCustomer Price per Unit
    123456Acme25
    123456Bonzo20
    123456Unity30
    234567Acme15
    234567Unity20
    234567Gargan13
    234567CMT18

     

    Items, S/Ns, and Sold-To:

    Item NumberS/NCustomer Sold-To
    12345610001Acme
    12345610002Acme
    12345610003Acme
    12345610004Acme
    12345610005Acme
    12345610006Acme
    12345610007Bonzo
    12345610008Bonzo
    12345610009Bonzo
    12345610010Bonzo
    12345610011Bonzo
    12345610012Bonzo
    12345610013Bonzo
    12345610014Bonzo
    12345610015Bonzo
    12345610016Unity
    12345610017Unity
    12345610018Unity
    23456720001Acme
    23456720002Acme
    23456720003Acme
    23456720004Acme
    23456720005Acme
    23456720006Acme
    23456720007Acme
    23456720008Acme
    23456720009Acme
    23456720010Unity
    23456720011Unity
    23456720012Unity
    23456720013Unity
    23456720014Unity
    23456720015Unity
    23456720016Unity
    23456720017Unity
    23456720018Gargan
    23456720019Gargan
    23456720020CMT
    23456720021CMT

     

    Correct Output:

    Product CodeRevenue
    123456$180
    Acme$100
    10001$25
    10002$25
    10003$25
    10004$25
    Bonzo$80
    10007$20
    10008$20
    10009$20
    10010$20

     

    Incorrect Output:

    Product CodeRevenue
     123ABC$45
    Acme$25
    10001$25
    10002$25
    10003$25
    10004$25
    Bonzo$20
    10007$20
    10008$20
    10009$20
    10010$20
      • abrother's avatar
        abrother
        Frequent Visitor

        Thank you so much for the help Ashish. I have another table that I need to make sure I have all of the Customer Sold-To data populated for each serial number, but this should work once I have that.