Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi!
I'm trying to calculate a historical count of customers that don't have an ongoing contract. So I want to have a chart diagram showing the amount of former clients at each point in time. Here is what I have at the moment:
Former clients = CALCULATE(DISTINCTCOUNT(ParentCompany[id]), FILTER(ALLSELECTED('Contract'), 'Contract'[EndDate] < MAX((DateTabe[Date]))))
Solved! Go to Solution.
Hi @TE
It seems a customer has many contacts at different dates,
Your measure show the customers including who have contacts before the specific date and after the specific date.
But what you expect is to only count the customers who's contacts are all before the specific date.
Is my understanding correct?
If so,
Create a table which is not connected to other tables
calendar = CALENDARAUTO()
Create measures in "contacts" table
max_date = MAX('calendar'[Date]) max_end_date = CALCULATE(MAX(contacts[end date]),ALLEXCEPT(contacts,contacts[customer id])) Former clients = CALCULATE(DISTINCTCOUNT(customer[customer id]),FILTER(ALLSELECTED(contacts),[max_end_date]<[max_date]))
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @TE
It seems a customer has many contacts at different dates,
Your measure show the customers including who have contacts before the specific date and after the specific date.
But what you expect is to only count the customers who's contacts are all before the specific date.
Is my understanding correct?
If so,
Create a table which is not connected to other tables
calendar = CALENDARAUTO()
Create measures in "contacts" table
max_date = MAX('calendar'[Date]) max_end_date = CALCULATE(MAX(contacts[end date]),ALLEXCEPT(contacts,contacts[customer id])) Former clients = CALCULATE(DISTINCTCOUNT(customer[customer id]),FILTER(ALLSELECTED(contacts),[max_end_date]<[max_date]))
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Excellent! Thanks @v-juanli-msft, this worked out just like I wanted to!
Is there any way to calculate the same measure but for the previous month or quarter so I can count the change in former clients?
Thanks so much!
TE
Hi!
The original problem is solved, but I still can't find a solution for quarter over quarter calculation for this. Can anyone help? @v-juanli-msft ??
Thanks!
TE
User | Count |
---|---|
124 | |
108 | |
99 | |
62 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |