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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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