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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
dkotiloglu
New Member

Prev Year FTE Number - Issue with DateAdd

Hi - I would like to calculate the headcount number for the latest actual month and compare it with the same period last year. 
I already calculated the latest actual month headcount and it is working fine however when I try to calculate last year I get the following error 

 

dkotiloglu_0-1672341602862.png

Latest FTE is headcount number of latest actual month and is working fine. I add MAX to DateAdd function cause I would like to look at latest available date and go back 1 year.

I already checked the following;

  1. Headcount Table, Date column is data type: Date/Time
    dkotiloglu_1-1672342342653.png
  2. Date columns are linked in Model

    dkotiloglu_2-1672342435163.png
  3. I created another measure and assign this to a card 
    MAX('Headcount'[Date]) returns the correct date as seen below (the latest date is Nov 1st in the file) but when I want to go back 1 year via DATEADD, it doesn't work.

    dkotiloglu_3-1672342678399.png

I appreciate your support, thanks in advance. 

 
3 REPLIES 3
FreemanZ
Community Champion
Community Champion

hi @dkotiloglu 

In DATEADD function, try to use the date column from the calendar table.

Thanks, tried however same, unfortunately. 

 

dkotiloglu_0-1672359371418.png

dkotiloglu_1-1672359460444.png

 

 

hi @dkotiloglu 

in your screenshot, it shows the calendar table definition. I meant to change in your PY FTE definition to

PY FTE=CALCULATE([Latest FTE], DATEADD('Calendar'[Date], -1, YEAR))

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.