Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
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
v-yulgu-msft
Employee
Employee

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
v-yulgu-msft
Employee
Employee

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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.