Forum Discussion

ksoltvedt's avatar
ksoltvedt
Regular Visitor
3 years ago

Splitting customer turnover

Dear,

I am having difficulty with following:

I have customerdata which I would like to attribute to our account managers. Most of the customers have a direct relationship with only one AM, but for some of our (larger) customers, they receive visits from some (if not all) of our AMs.

 

This means that the turnover generated should be attributed based on a weighted score, as we only have a total amount of turnover generated.

 

This is where I am having issues in Power BI, as I can't seem to wrap my head around how start by attributing the weight for those customers, and at the same time have the turnover showing for customers where we only have 1 AM visiting.


As you can see in the above uploaded picture, most customers have a weighted score of 1 or 100% whereas some of them have a split, which tallies to 100% as well.

 

Any help would be appreciated.

 

Best regards,

Ken




9 Replies

  • If you have an Invoices table which includes the income, the customer and the account manager then you could write a measure like 

    Weighted income =
    SUMX (
        Invoices,
        VAR Weight =
            LOOKUPVALUE (
                Customers[Weight],
                Customers[Customer], Invoices[Customer],
                Customers[Account manager], Invoices[Account manager]
            )
        RETURN
            Invoices[Income] * Weight
    )
    
  • ksoltvedt's avatar
    ksoltvedt
    Regular Visitor

    It apears I can get a matrix going now, with everything showing per account and divided per account manager, however the wrong values are showing AND it's always the same value.

    So as you can see in the example below the total sales value doesn't match and it repeats for every customer

     

    edit: I resolved the values issues, where it didn't show the same value in the matrix table. I referenced another mapping, which seems to have done the trick.

    Only stuck with having the same value for each and every value in the matrix table now.

     

    • johnt75's avatar
      johnt75
      Super User

      that looks like both the customer and the account manager fields are coming from tables which do not filter the invoices table. either that or the measure definition is using ALL or REMOVEFILTERS where it shouldn't

    • johnt75's avatar
      johnt75
      Super User

      which table are you using for the columns in the matrix visual? what sort of relationship does that table have to Master Data?

  • ksoltvedt's avatar
    ksoltvedt
    Regular Visitor

    I no longer can show any value. 

    I get following error message now, additionally to the prior issues.

    I clustered the naming, to hopefully make it a bit more easy to comprehend.

    With following error message

    And the measure as is

    Weighted income =
    SUMX (
        F_Invoices,
        VAR weightedcalc =
            LOOKUPVALUE (
                Dim_CustomerSplit[WEIGHT],
                Dim_CustomerSplit[CUSTOMER_NAME], F_Invoices[AA_Name_Customer],
                Dim_CustomerSplit[ACCOUNT_MANAGER], F_Invoices[AA_AccountManager]
            )
        RETURN
            F_Invoices[AA_IncomeExc] * weightedcalc
    )

    Best regards,
    Ken
    • johnt75's avatar
      johnt75
      Super User

      There must be more than one entry for at least one combination of customer and account manager

      • ksoltvedt's avatar
        ksoltvedt
        Regular Visitor

        I just wanted to add following:


        This is the whole idea.

        I have some customer (of whom I only have 1 value in the fact table), but I want to split those across the account managers. Others only have 1 account managers contribution. Therefor I would want to have a matrix level performance in which I can see both the total value and split performance of the customers where it is necessary and other customers where there is only 1 account managers attributing to the customer.

        Hope this is a bit clear?

        Br,

        Ken

  • ksoltvedt's avatar
    ksoltvedt
    Regular Visitor

    Can I in some sort or form share a PBIX file to showcase the issue or is this not possible?