Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Sum calculation filtered on multiple dates

Hello all!


I am struggling to do a sum where the calculation is referencing 2 dates when trying to calculate the sum of insurance premium on a (historical) daily basis.


The ‘active premium’ on any given day (valuation date) will sum the premium of all policies that are ‘active’. Active is defined if the start date of the policy is on or before the valuation date and the end date is after the valuation date. Simply put, the policy is mid-term on that valuation date. Note that the valuation date is just a date, i.e. snapshot in time not a date range such as a month or quarter.


This is a boiled down data of what sample data looks like. If we used a valuation date of 01 March for example, we would sum the premium for policy 2 & 3 and the active premium for that date would be 250+50=300.




I have joined the above table to a date table on start date and  end date. I dont know if this is causing a problem?


To calculate for today I would do the following calculation:


Active Premium = CALCULATE(
                              Book[Start Date]<=TODAY(),
                              Book[End Date]>TODAY()     )



I need this active premium calculated at every (valuation) date in the past 2 years, not just today, where I can then graphically represent it in a way that looks aesthetically pleasing, i.e. whether I want to look at snapshots at month end, quarter end, yearend or even a line graph with daily data points. I would like to use the dates in the date table as the historic valuation dates. 


Quite new to Power BI and very new to DAX. Thanks in advance for any help!

Super User
Super User

Super User
Super User

@DA1981 , refer if one the two blog can help you

Power BI Features || Datamarts: || Field Parameters :
Time Intelligence Decoded : || 50+Power Query List Functions : Learn Power Query List
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

Helpful resources

September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Dev Camp Session 26

Check it Out!

Mark your calendars and join us on Thursday, September 29 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors