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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
escaddie
Frequent Visitor

Measure to get a running total for policies that billed only during a specific period

Hey Community, 

I have been langishing over this for some time.

I have a list of policies with start and end dates and I want to visualize them over time with a total of "active policies" for any given period. 

PolicyNoStartDateEndDate
11/1/20191/15/2020
21/1/20202/20/2022
31/2/20202/20/2022
43/1/2021 

 

Some policies don't have end dates because they are continuously billing. 

 

Thank you, 

2 ACCEPTED SOLUTIONS

This is magical! I didnt think to look at HR type visualizations. Thank you. Im going to impliment this today and if all is well will mark as the solution.

View solution in original post

v-zhangti
Community Support
Community Support

Hi, @escaddie 

 

You can try the following methods.

Date Table:

Date = CALENDAR(MIN('Table'[StartDate]),MAX('Table'[EndDate]))

Measure:

active policies = 
CALCULATE (
    COUNT ( 'Table'[PolicyNo] ),
    FILTER (
        ALL ( 'Table' ),
        [StartDate] <= MAX( 'Date'[Date] )
            && [EndDate] >= MAX('Date'[Date] )
    )
)
    + CALCULATE (
        COUNT ( 'Table'[PolicyNo] ),
        FILTER (
            ALL ( 'Table' ),
            [StartDate] <= Min( 'Date'[Date] )
                && [EndDate] = BLANK ()
        )
    )

vzhangti_0-1660717844517.png

vzhangti_2-1660717928143.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

4 REPLIES 4
v-zhangti
Community Support
Community Support

Hi, @escaddie 

 

You can try the following methods.

Date Table:

Date = CALENDAR(MIN('Table'[StartDate]),MAX('Table'[EndDate]))

Measure:

active policies = 
CALCULATE (
    COUNT ( 'Table'[PolicyNo] ),
    FILTER (
        ALL ( 'Table' ),
        [StartDate] <= MAX( 'Date'[Date] )
            && [EndDate] >= MAX('Date'[Date] )
    )
)
    + CALCULATE (
        COUNT ( 'Table'[PolicyNo] ),
        FILTER (
            ALL ( 'Table' ),
            [StartDate] <= Min( 'Date'[Date] )
                && [EndDate] = BLANK ()
        )
    )

vzhangti_0-1660717844517.png

vzhangti_2-1660717928143.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

This was great pretty much exactly what I needed. I changed the ALL filters to ALL selected so I could filter them on the visual but other than that works like a charm. Thank you.

amitchandak
Super User
Super User

@escaddie , refer to my blog and the attached file after the signature on the same topic

 

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

This is magical! I didnt think to look at HR type visualizations. Thank you. Im going to impliment this today and if all is well will mark as the solution.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.