Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Cumulative Total Performance

I have been trying to perform an 80/20 Analysis on product sales over the past 3 years.  This analysis ranks each product by its total sales if it is greater than 0.  I have two tables Products (200k...
  • Anonymous's avatar
    Anonymous
    4 years ago

    I believe I've landed on a solution where I can get accurate data.  This version of the 8020 analysis looks at the total sales and rates each product based on non-zero or non-negative sales.  I've used the performance analyzer to measure the times with each change.  I found using Calculatetable and Summarize in the bottom measure to perform the same.  It still takes > 220000 ms to respond but will return data locally and on the power bi cloud.

     

    8020 Revenue =
    calculate(
    calculate([Invoice Amount], ALLSELECTED(Products[Item Number])),filter(Products,calculate([Invoice Amount]
    , ALLSELECTED(Products[Item Number]))>0))

     

    Cumulative 8020 Product Revenue =
    VAR ProductRevenue = [8020 Revenue]
    RETURN
    calculate(sumx(
    filter(
    CALCULATETABLE(
    addcolumns(ALLSELECTED(Products[Item Number]), "Product Revenue", [8020 Revenue])
    ,filter(addcolumns(ALLSELECTED(Products[Item Number]),
    "Product Revenue", [8020 Revenue]),[Product Revenue] >0 && [Item Number] <> "unknown")),
    [Product Revenue]>= ProductRevenue)
    ,[Product Revenue]))