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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / After Filtering the da...
Power Apps
Unanswered

After Filtering the data calculate the time again.

(0) ShareShare
ReportReport
Posted on by 15

Hi Team,

I am facing a challenge where I am calculating the time difference from a field where the requirement:

"Second row start time is first row end time" So calculation is working fine as per requirement but the problem is I am also filtering the data from the data source.

Now in filter data I want  to add row so there "hh:mm" set as "00:00" (Bases on logic), here I need to calculate the time.  

Sharing the snapshot for better understanding.

Vk_Mohit_0-1704982026249.png

Based on this image when I am coming after saving data and filter data need to add row then facing problem.

Logic based on fields sharing here:

1-Time field code is:
Text(Time(0,DateDiff(LookUp(colactivrreport,RID=ThisItem.RID).Starttime,LookUp(colactivrreport,RID=ThisItem.RID+1).Starttime,TimeUnit.Minutes),0),"hh:mm")

Getting difference as 07:30 - 7:00 = 00:30

In the last  getting 00:00

 

2- Starttime Code:Default

If(!IsBlank(Filter(colactivrreport,'Project Number'=drpProjectID.Selected.Value && DateValue( Today_Date)= embarkdate_1.SelectedDate)),
ThisItem.Start_Time,ThisItem.Starttime)

 

3- Add Row Code:

If(IsBlank(drpProjectID.Selected.Value),Notify("Please select project id",NotificationType.Error),Collect(colactivrreport,{Starttime:"",RID:CountRows(colactivrreport)+1}););

 

Note:

Here I want the logic where to calculate the time in last when coming from filter data.

 

 

 

 

 

Categories:
I have the same question (0)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard