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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

DAX Formula Help

KPI Post.png

I am trying to pull the scheduled hours for the previous period. For example, June Period 2 the scheduled hours is 36,638.77 and the last period should be 40,230.19 instead it's showing 345,622.21. Another example is June Period 1 the scheduled hours is 40,230.19 and the last period should be 35,244.43 instead it's showing 285,858.76.

 

I can't seem to figure out what the issue is with my DAX and why it's returning numbers significantly greater.

Scheduled Chg Booked Hours is also a formula by the way that takes the Sum of Booking Hours and filters for Charge Type: Chargeable and Booking Status: P.

 

Current DAX:

Sched Chg Booked Hrs Last Period =

var LastPeriod = MAX('dim FiscalFinancialPeriod'[PreviousPeriod])

var ReturnThis =

CALCULATE(SUM('fact BookedTime'[BookingHours])
, FILTER(ALL('dim Booking'), 'dim Booking'[Charge vs. Noncharge]="Chargeable")
, FILTER(ALL('fact BookedTime'),'fact BookedTime'[BookingStatus]="P")
, FILTER(ALL('dim FiscalFinancialPeriod'), 'dim FiscalFinancialPeriod'[FiscalFinancialPeriod]=LastPeriod)
)

return (ReturnThis)
3 REPLIES 3
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Please share us a dummy .pbix file for test. Please remove sensitive data and unnecessary visuals. It is suggested to upload your file to OneDrive for Business and then paste the link here.

 

 

Best regards

Icey

Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

You use lots of ALL() - that might be the issue. What are the filters on your visual?

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.