Forum Discussion
How I accumulate clients different months
- 5 years ago
Ok. With this model:
And these measures:
Number of attentions = COUNT(FactTable[CUSTOMER])Distinct Customers = DISTINCTCOUNT(FactTable[CUSTOMER])and..
New customers = CALCULATE ( DISTINCTCOUNT ( FactTable[CUSTOMER] ), FILTER ( ALL ( 'Date Table' ), 'Date Table'[Date] <= MAX ( 'Date Table'[Date] ) ) )You get the following:
- 5 years ago
This should work:
New customers = VAR _Year = SELECTEDVALUE ( Date Table [Year] ) CALCULATE ( DISTINCTCOUNT ( FactTable[CUSTOMER] ), FILTER ( ALL ( 'Date Table' ), 'Date Table'[Date] <= MAX ( 'Date Table'[Date] ) && Date Table [Year] = _Year ) )
Hello, if I have a date table, which I have attached to the date field of the list I published
Do you consider new client when the client first appears in the year? Does the count start at the beginning of each year?
- Syndicate_Admin5 years ago
Administrator
Hi yes, the count restarts every year and is considered a new customer when it appears for the first time in the year.
- PaulDBrown5 years ago
Community Champion
Sorry, could you please explain the relevance of the rows where Date = "21 years ago"?
Also, do the date values such as 21-feb or 21-july refer to year-month or date-month?
what do the rows for Date = June 21-2 actually mean? (does your real data actually look like this??)
It would be very helpful is you provided a sample PBIX file via Dropbox, OneDrive, Google Drive...
- Syndicate_Admin5 years ago
Administrator
Sorry, the table was copied wrong when pasting it, the date field is in date format (DD/MM/YYYY) but pasting it here changes the format.
DATE CUSTOMER January/2021 KAREN January/2021 KAREN January/2021 PAOLA January/2021 VAIN February/2021 PAOLA February/2021 ANDREINA (NOWA) February/2021 VAIN February/2021 GABRIELA March/2021 KARINA March/2021 PAOLA March/2021 ANDREINA (NOWA) March/2021 KAREN March/2021 ANGELA April/2021 CARLA April/2021 YENNY April/2021 ADELAIDE April/2021 PAOLA May/2021 SOFIA May/2021 GIULIANNA May/2021 ANDREINA (NOWA) June/2021 PAOLA June/2021 ANGELA June/2021 ROSE July/2021 CYNTHIA July/2021 CYNTHIA July/2021 PAULA July/2021 PRISCILLA August/2021 KAREN August/2021 ANGELA August/2021 ANGELA August/2021 PAULETTE UNIQUE PATIENTS 17