cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
kmonges
Regular Visitor

DAX : Cumulative members by month based on the previous 12 months

Hi,

 

I have a technical problem.

 

I want to accumulate members by month based on the previous 12 months

These are the Rules :

- We must check that the members at M-12 made a sale this month.

- These members must have made a second sale in the following months to be considered a member of the active community.

 

Example : We are in May 2018, it is necessary that my member who realized a sale in May 2017 and a 2nd in the following months to be in the community.

 

Nombre de personnes dans la communauté =
CALCULATE(
  COUNTROWS(
    FILTER(
      SUMMARIZE(
        'P_sharingcities bel_sales';
        'P_sharingcities bel_sales'[member_id];
        "Nb"; COUNT('P_sharingcities bel_sales'[member_id]));
        [Nb] > 1 /*On va selectionner le nombre de vente des membres*/
    ) /*Création de la table avec 2 colonnes*/
   );
FILTER(ALL('Calendrier'); AND(Calendrier[Date] <= MAX(Calendrier[Date]) ; DATEADD(Calendrier[Date]; -12 ;MONTH) >= MAX(Calendrier[Date]))))

 

This is almost good but I cannot control for the first sell... I would like to start counting at the M-12 month... 

So it does not do that. 

 

Someone to help me please...

 

Thank you in advance

Kevin

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-yulgu-msft
Microsoft

Re: DAX : Cumulative members by month based on the previous 12 months

Hi @kmonges,

 

For your requirement, here are two blogs sharing similar examples for your reference:

rolling 12-months average in DAX

Show only the sales for the last 12 months

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Microsoft v-yulgu-msft
Microsoft

Re: DAX : Cumulative members by month based on the previous 12 months

Hi @kmonges,

 

For your requirement, here are two blogs sharing similar examples for your reference:

rolling 12-months average in DAX

Show only the sales for the last 12 months

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors