Forum Discussion

nulldemon's avatar
nulldemon
Frequent Visitor
6 years ago
Solved

Need Help Calculating repeat customers Percent monthly from Customer and sales

Team Leads have agents below them. Each agent books loads. We want to know which agent has repeat carrier business. As you can see When clicking on Dax in the month of April, he used carrier Bline 3 times. If they use the carrier 3 times or more, we count that as repeat carrier regardless of the customer. Dax in the month of May has 3 loads.

 

What we need help with to make is one table that gives the Percent of total loads booked / by repeat carriers.  For example Dax booked a total of 5 loads in April. 3 of them were repeat carriers. His percent would be 60% for April. In May his repeat would be 75% So we want Aa table that gives all agents there repeat carrier % as well as adding up the team leads

 

 

 

 

We want it to look like this

 

 

Here is a example PBIX 

 

 

Example of the sample 

https://drive.google.com/file/d/1sam1CVOy50QCT31zzRh1Uup4qYDpJwrl/view?usp=sharing

  • Change the repeat formula to

    Repeat = 
    var l1 =SUMMARIZE(Sheet1,Sheet1[Carrier],"G1",SUM(Sheet1[Loads]))
    var _rep= CALCULATE(sumx(filter(l1,[G1]>1),[G1]))
    return _rep

    Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
    Thanks.

3 Replies

  • I created formulas and added a visual on page 2. But the requirement of getting values above dimension seems to have limitation 

     

    https://www.dropbox.com/s/8q0ki3p25ruxmse/test%281%29.pbix?dl=0\

     

    Refer

    https://community.powerbi.com/t5/Desktop/Matrix-Column-Headers-Measures-before-Dimension-SSAS/td-p/339911

     

    Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
    Thanks.

    • nulldemon's avatar
      nulldemon
      Frequent Visitor

      I added it to our main dataset. Here is what we are getting. 

       

      So we look at brandon he had 86 loads. so the math should be 7/86 should be 0.08138 or 8.1%

       

      it is showing 0.03.

       

      So we are filtering out what agent has booked more than 3 loads with one carrier.  

       

       

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        Change the repeat formula to

        Repeat = 
        var l1 =SUMMARIZE(Sheet1,Sheet1[Carrier],"G1",SUM(Sheet1[Loads]))
        var _rep= CALCULATE(sumx(filter(l1,[G1]>1),[G1]))
        return _rep

        Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
        Thanks.