Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
96 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
88 | |
63 |