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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Sum value between start date and end date

Hi all,

 

I am facing the following problem. I have a dataset in which I have one table with projects that have a total hours column, a start date column and an end date column. Furthermore I have a date table with all dates between 2020 and 2025.

 

I have a measure that is supposed to sum the total hours column between the start and end date. However, this measure is showing unintended behaviour. The measure is as follows:

 

 

ActualTotalHourCount = 
VAR _FirstDate = FIRSTDATE ( 'Date'[Date] )
VAR _LastDate = LASTDATE ( 'Date'[Date] )

RETURN
CALCULATE (
    SUM ( Query1[Uren (Actueel)] ),
    Query1[ActualBegin] <= _LastDate,
    Query1[ActualEnd] > _FirstDate|| ISBLANK ( Query1[ActualEnd] )
)

 

 

 

In which Date is my date table, Query1[Uren (Actueel)] is my column with an amount of hours for each project, ActualBegin is the start date and ActualEnd is the end date of the project.

 

This measure sums hours as intended but when I visualize the measure in a line graph, the following happens:

 

Screenshot 2021-11-04 141432.png

 

As shown, the line graphs shows no values for december, even though I have projects with a start date of 01/10/2021 and an end date of 01/01/2022 as shown below:

 

Picture1.png

 

Any clue as to what I am doing wrong? Thanks in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

My problem got solved by implementing a different solution derived from the following topic: https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...

 

Unfortunately I haven't been able to get the original solution operational.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

My problem got solved by implementing a different solution derived from the following topic: https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...

 

Unfortunately I haven't been able to get the original solution operational.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors