Forum Discussion

qjc171819's avatar
qjc171819
Frequent Visitor
9 years ago
Solved

Top 80% Engagement

Hi guys,

I have a table with Item ID and Engagement. Now i would like to create another table that shows which items that make up 80% of total engagements, also these items should desc by engagement.

The original table:

 

What i want to create:

 

ps: 220*80%=176. From the table, item C, D, A ,79+60+46=185>176, but 79+60=139 less than 80 percent.

Any advice?

 

Regards 

Jesse

  • ive never done this before but maybe this will work

     

    qjc171819

     

    engagementmeasure = sum(engagment)

     

    incrementalengagement =
    VAR CurrentEngagement = Table[engagementmeasure]
    RETURN
        SUMX (
            FILTER ( table, table[engagementmeasure] >= incrementalengagement ),
            table[enagementmeasure]
        )

     

    Table[IncrementPCT] = 

    DIVIDE (table[incrementalengagement], 

    sum (engagementmeasure))

     

     

    then based on that result theoretically you can create a table where the Table[IncrementPCT] <= 0.8

10 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    ive never done this before but maybe this will work

     

    qjc171819

     

    engagementmeasure = sum(engagment)

     

    incrementalengagement =
    VAR CurrentEngagement = Table[engagementmeasure]
    RETURN
        SUMX (
            FILTER ( table, table[engagementmeasure] >= incrementalengagement ),
            table[enagementmeasure]
        )

     

    Table[IncrementPCT] = 

    DIVIDE (table[incrementalengagement], 

    sum (engagementmeasure))

     

     

    then based on that result theoretically you can create a table where the Table[IncrementPCT] <= 0.8

    • GIO200011's avatar
      GIO200011
      Advocate I

      Hello,

       

      But with this approaching, you have less than 80 %. If I want to cover that 80 %, what should I do? Without manually change the 80 % for the value of the next Item.

       

      I need to know the clients that are the 80 %, but it must be at least 80 %, If I set less or equal than 80 %, this approaching will only be correct when the clients do exactly 80 %, but if they do 81 %, it will take earlier item (maybe 78 %). 

       

      Any suggestion?

       

      Regards!