web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

Date Difference

(0) ShareShare
ReportReport
Posted on by 48

I have two date pickers (startdate, enddate).

Where would I fit the datediff into this string, please?  Thanks for whatever 

knowledge you can share.

Sort(
 AddColumns(
 GroupBy(
 'FLMA Tracking',
 "Dept",
 "Station",
 "OtherData"
 ),
 "Hours",
 Sum(OtherData,HoursUsed)
 ),
 Station
)
Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Kaschlegel 

    You've not provided a lot of detail on what you are trying to do, so I will just assume you are using datepickers to filter out a range of dates from the results of your table.

    If so, then the following formula should assist.

    Sort(
     AddColumns(
     GroupBy(
     Filter('FLMA Tracking',
     dateCol >= startDate.SelectedDate && 
     dateCol <= endDate.SelectedDate
     ),
     "Dept",
     "Station",
     "OtherData"
     ),
     "Hours",
     Sum(OtherData,HoursUsed)
     ),
     Station
    )

     

    I hope this is helpful for you.

  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    Hi @Kaschlegel ,

    You did not specify the field, but it would go in here

    Sort(
     AddColumns(
     GroupBy(
    Filter( 'FLMA Tracking',
    DateDiff( . . . .
    ), "Dept", "Station", "OtherData" ), "Hours", Sum(OtherData,HoursUsed) ), Station )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard