Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Average in costumer profiles

I need a Measure, or anything else that show me the fallowing situation: Every costumer have a profile, that means they buy things in some months with the same interval ( for example, i can have on costumer that buy our products on january,april,july,october. That means he always buys once every three months). I need to calculate this profile for my list of clients, and show in a chart/table the costumer who didnt boughth anything in the month profile they have.

 

Im using 12 Months as the period to create this profile(today is march 2018 until march 2019, in april this period will update to april 2018 until april 2019)

 

Here are 2 examples and the measures that im using







I use this measure to shows if the customer bought anything 

 

Measure =
IF (
           MAX ( 'Table'[Date] ) <= EOMONTH ( TODAY (); -13 );
           BLANK ();
           IF(
                 IF (
                       ISBLANK ( DISTINCTCOUNT ( fOrder[K_NumberOrder] ) );
                        0;
                        DISTINCTCOUNT ( fOrder[K_NumberOrder] )
                )>0;
                   1;
                   0
           )
)




Calendar table

Table = CALENDAR(DATE(YEAR(TODAY())-1;MONTH(TODAY());01);DATE(YEAR(TODAY());MONTH(TODAY());01))




Thanks






2 Replies

  • v-cherch-msft's avatar
    v-cherch-msft
    Microsoft Employee

    Hi Anonymous 

    I cannot fully understand your expected output.You want to get 3 for the selected customer as he always buys once every three months?Sample data and expected output will be helpful to provide an accurate solution.Please share some simfplified sample data.For further,please refer to How to Get Your Question Answered Quickly

    Regards,

    • Anonymous's avatar
      Anonymous
      Not applicable

      Here is my .pbix

      https://1drv.ms/u/s!Apt7lzq2XcE5jCPtfPPkWKH3KjA5

       

      When i set "A A R DA SILVA EPP" in the slicer value i can see he have the profile of buy things once per month( April to August, he bought every month) but i can see in September he didnt buy, i had to make a alert(could be anything, conditional formatting) that shows me that i have to pay attention on him cause he run away from his pattern(buy things once per month)

       

      When i set "A AVALLONE SANTOS ACESSORIOS-ME" i need to do almost the same thing, this time my patter is buy things once per two months