Forum Discussion

afrutos's avatar
afrutos
Resolver I
4 years ago
Solved

Cumulative count

Hi everyne, 
I need some help here, thanks in advanced

I need to calculate de cumulative of new members entering from a date
I need to calculate the number of new members from those who had joined up to 11/04/2021; to calculate those who had joined on this date I need to consider the following:

Authors[IdEntity]=01,
Authors[DateDeceased]=BLANK(),
Authors[DateDeceased]=BLANK(),
Authors[Age]<=80,
Consulta1[fechaMas500]<11/04/2021


Once this date is calculated, if I select a later date and year, I need tocalculate the accumulated number of new members. But I can't get the formula right.


I have tried this one
FIRSTDATE500 = CALCULATE(DISTINCTCOUNT(Query1[IdAuthor]),Authors[IdEntity]=01, Authors[DateDeceased]=BLANK(),Authors[DateDeceased]=BLANK(),Authors[Age]<=80,Authors[dateMost500]<11/04/2021)

 

 

Thanks!!

  • Hi afrutos ,

    According to your description, I guess the [IdEntity] column should be of text type, modify the formula of this part to Authors[IdEntity]="01".

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • afrutos , try a measure like

     


    FIRSTDATE500 = CALCULATE(DISTINCTCOUNT(Query1[IdAuthor]),Filter(allselected(Authors), Authors[IdEntity]=01 && isblank(Authors[DateDeceased]) && isblank( Authors[DateDeceased])
    && Authors[Age]<=80 && Authors[dateMost500]< date(2021,04,11) && Authors[dateMost500]<= max(Authors[dateMost500]) ))

    • afrutos's avatar
      afrutos
      Resolver I

      Hi it returns me an error,
      "DAX comparison operations do not support comparison values of type Text with values of type Integer."
      An I think it is because of IdAutor, an exampe of IdAutor is "AUT150595"

      But I don't know how to solve it, I've tried using Values but not working

      • v-yanjiang-msft's avatar
        v-yanjiang-msft
        Community Support

        Hi afrutos ,

        According to your description, I guess the [IdEntity] column should be of text type, modify the formula of this part to Authors[IdEntity]="01".

        Best Regards,
        Community Support Team _ kalyj

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Hi afrutos ,

    Is your problem solved?? If so, Would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

    Best Regards,
    Community Support Team _ kalyj