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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.