Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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.

 

 

 

 

 

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,620 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,962 Most Valuable Professional

Leaderboard