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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Tihannah
Resolver I
Resolver I

QTD/YTD FTE's. Please help!

I can't figure out why this is only calculating correctly for most departments and not others. Hoping someone can tell me what I'm doing wrong or give me a better calculation to do. Calculating FTE's for Monthly financial statements showing Current Month, QTD and MTD.  These are the calcs I'm using.

 

FTEs = SUMX(VALUES('Table'[ftes]),CALCULATE(AVERAGE('Financial GL'[ftes])))
FTEs Actual = CALCULATE([FTEs],FILTER('Table','Table'[Txn_Type_Cd]="ACT"))  (Distinguishes Actual from Budget)
FTEs ACT QTD = CALCULATE(TOTALQTD([FTEs Actual],'Calendar Dim'[Cal_Dt])/MAX('Calendar Dim'[MthOfQuarter]))
FTEs ACT YTD = CALCULATE(TOTALYTD([FTEs Actual],'Calendar Dim'[Cal_Dt])/MAX('Calendar Dim'[Mth_Num]))
 
The FTEs Actual column gives me a correct number for all. QTD/YTD are working for 90% of the departments. There's only a few where they simply aren't calculating the QTD/YTD columns correctly, and it seems to be those that have a smaller amount of monthly FTE's.
 
One dept runs 4 FTE's every month. For QTD May, it's showing 2 FTE's instead of the 4 it should be showing. But if I remove the "/MAX('Calendar Dim'[MthOfQuarter]))", it fixes that department and all the other departments are messed up. Can someone please help me with a better way to do this.  FYI, because its Financials, all the of the data is rolled up by month, so I don't need to worry about daily averages. Any help is greatly appreciated.
 
1 ACCEPTED SOLUTION
Tihannah
Resolver I
Resolver I

 I figured out another work around.  I had to divide my QTD dax by a MonthofQuarter column I created in the Date table, and then the YTD by Month Number. Thanks.

View solution in original post

3 REPLIES 3
Tihannah
Resolver I
Resolver I

 I figured out another work around.  I had to divide my QTD dax by a MonthofQuarter column I created in the Date table, and then the YTD by Month Number. Thanks.

Greg_Deckler
Super User
Super User

@Tihannah Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Here are 2 sample departments - 

Sales -

Jan - 17.2

Feb - 16.8

Mar - 16.2

Apr - 18.3

May - 15.9

 

The calculations above are giving me QTD May - 17.1  and YTD - 16.9 which are correct.

 

For Admin - 

Jan - 4.0

Feb - 4.0

Mar - 4.0

Apr - 4.0

May - 4.0

 

QTD May is showing 2.0  and YTD is showing 0.8 from the same dax calculations?  Both should be 4.0

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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