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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
adamSW157
Frequent Visitor

Head Count using Sum

I'm trying to create a Headcount to display a value by time/ over months, i have a working formual but my data isnt in the correct format. how would i go about changing it or adapt the formual to work? I would also need the lastest 'value' from any updates to be used in the head count.

My current table looks like this

Unique ID

Record Type

Date entered

Value

111

Added

01/08/2018

20

111

Cleared

10/10/2018

 

112

Added

01/09/2018

20

112

update

15/09/2018

15

112

Cleared

10/11/2018

 

 

This is the data format that works with the following formula

total =
CALCULATE(
 SUM(Sheet3[Value]),
 FILTER(Sheet3,(Sheet3[Added ]<= LASTDATE('Date'[Date])
    && Sheet3[Cleared ] >= FIRSTDATE('Date'[Date]))
    ))

Unique ID

Added

Cleared

Value

111

01/08/2018

10/10/2018

20

112

01/09/2018

10/11/2018

15

 

This is the end goal a summary of all values added accross months

 

Capture.PNG

6 REPLIES 6
LivioLanzo
Solution Sage
Solution Sage

Hi @adamSW157

 

I am trying to understand your logic. Should you not have 55 in September and October, since both 111 and 112 are open during this month. And also why in November you just have 15? Shouldn't it be 35?

 

 

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

I'm only interested in showing what the most recent value was accross the time it was 'Open' for I.e 15 for 112 and 20 for 111.

Therefore its 35 as they both occur in September and October and only 15 for Novemeber as 111 was clear on 10/10/2018

I'm happy with the fromula i'm using just need a hand either changing the data set within BI to the second table or finding away to pick up the 'added' and 'cleared' dates and inserting them into the formula.  

@adamSW157

 

I would remodel your table as per my attached file and then the measure because a simple SUM

 

https://1drv.ms/u/s!AiiWkkwHZChHjycWYZPalNOlrQsT

 

 

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

@LivioLanzo that's great didn't know you could write such in-depth formulas with BI.
However with your way i wouldn't be able to drill down from months to days/weeks.

It is possible to change the model to make the analysis by days possible, I thought you wanted to do it at month level since you wrote "I'm trying to create a Headcount to display a value by time/ over months"

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

@LivioLanzo your not wrong that was originally what i asked for and i'm grateful for your help. But as i use BI more i can see how going down another level may be useful in some cases.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors