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

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.

Reply
Anonymous
Not applicable

Active Clients by Month

Hi

 

I am new to Power Bi and need some help in trying to be able to calculate "active clients" by program each month. I am using a connection directly to a CMS system which is providing me with the total list of clients. In the table is a "program start date", a "program end date" and the program name in columns. It looks similar to the below table. I think I can easily get the program information through filters but I am not sure how to get the active client number on a monthly basis. I also have a separate date table.

 

Thanks in advance

 

Clientprogram_nameprogram_start_dateprogram_end_date
1A1/07/201920/12/2019
2B27/07/201930/08/2019
3C1/01/20189/11/2018
4D1/06/201822/02/2019
5D31/12/20185/03/2019
6A25/01/2019 
7B30/11/20186/10/2019
8C20/01/20195/05/2019
9E5/02/2019 
10A20/02/201914/09/2019
11B9/03/2019 
12E22/04/201920/05/2019
13C1/09/2019 
14D3/10/20176/06/2018
15B22/12/201718/06/2018
16B9/05/201830/11/2018
17A10/03/201929/07/2019
18D8/08/2019 
19C5/05/20189/09/2019
20E30/06/2019 
21E9/09/2019 
1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

Here is the same post for you refer to:

https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365

 

For your case, just add a conditional that if there is no value in "program end date" should it be "Today" or other default date.

 

Best Regards,

Lin

 

Community Support Team _ Lin
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

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

Here is the same post for you refer to:

https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365

 

For your case, just add a conditional that if there is no value in "program end date" should it be "Today" or other default date.

 

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi, @Anonymous. If I understand your goal, you can use the FILTER function together with a DATE table in order to get just the active clients between the dates. Try something like this:



Active Clients =
CALCULATE (
    COUNT ( NameTable[Clients] );
    FILTER (
        NameTable;
        NameTable[program_start_date] >= MIN ( Date[Date] )
            && NameTable[program_end_date] <= MAX ( Date[Date] )
    )
)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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