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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Error in DATESYTD calculation

Hey, guys, I have been doing a PBI dashboard to see the positions closed by recruiter in the Tech Company I work. I need the average by active recruiter by month and by year. 

 

In order to do that, I used DATESYTD. The idea is to sum the "Month AVG" and divided for 12 to get the annual average. However, as you can see in the picture below, the sum is not correct, it should be 128.7 and not 136.5. The YTD Positions closed is been divided by the number of active recruiters by month, which is not correct. Do you know how to fix it?

 

recruiters.PNG

 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

You may take a look at the post below.

https://community.powerbi.com/t5/Desktop/monthly-average-of-daily-sums/m-p/291451#M128396

Community Support Team _ Sam Zha
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

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

You may take a look at the post below.

https://community.powerbi.com/t5/Desktop/monthly-average-of-daily-sums/m-p/291451#M128396

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
tkrupka
Resolver II
Resolver II

Do you have the actual measures formulas you are using?

Anonymous
Not applicable

Hello, @tkrupka , thank you for the reply! Yes, I have.

 

1. Calculate the active recruiters in the time context:

Recruiters =
CALCULATE (
    COUNT ( 'Recruiters'[Qtde recruiters] );
    FILTER (
        'Recruiters';
        'Recruiters'[De] <= MIN ( Data[Data] )
    );
    FILTER (
        'Recruiters';
        'Recruiters'[Considerar até] >= MAX ( Data[Data] )
    )
)

2. Calculate the positions closed in the time context:

Positions Closed =
CALCULATE (
    SUM ( Position[Number of Positions] );
    FILTER ( Position; Position[Status] = "Closed" );
    FILTER (
        'Closing Data';
        'Closing Data'[Closing Data] >= MIN ( Data[Data] )
            && 'Closing Data'[Closing Data] <= MAX ( Data[Data] )
    );
    FILTER (
        'Recruiters';
        'Recruiters'[De] <= MIN ( Data[Data] )
    );
    FILTER (
        'Recruiters';
        'Recruiters'[Considerar até] >= MAX ( Data[Data] )
    )
)

3. Calculate the sum of the average positions closed by number of active recruiters:

Sum of AVG  =
CALCULATE (
    [Positions Closed] / [Recruiters];
    DATESYTD ( Data[Data] )
)

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors