cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
baterdene
Regular Visitor

differentiating two date values with condition

I want to differentiate two date values with email filtering on my Power App.

The result i'm looking for is to count all overdue jobs for assigned person in SharePoint list by each person, and then summarize all overdue work in Share Point list. But i don't know how to solve it.

 

Please help me if know how to solve it.

1 ACCEPTED SOLUTION

Accepted Solutions
baterdene
Regular Visitor

I have solved in little bit complex way and it worked. Which i created 2 calculated column on my sharepoint list to fill the datediff with value "overdue" and "not overdue" and then i tried to calculate the datediff by filtering overdue status column. i'll try this code on my app it looks simple. Thank you

View solution in original post

3 REPLIES 3
v-yujincui-msft
Community Support
Community Support

Hi @baterdene ,

 

Do you want to count all overdue jobs for everyone and save the results in another List?

 

Best Regards,

Charlie Choi

v-yujincui-msft
Community Support
Community Support

Hi @baterdene ,

 

I have made a test for your reference.

 

1. Here is my SharePoint List.

vyujincuimsft_0-1652237557027.png

2. Add a Button Control and apply the following formula on its OnSelect property as:

ForAll(
    Distinct(datasource,'Assign to'.Email),
    Collect(collectionname,
        {Assignto: Result,
        Num: CountRows(Filter(datasource,'Assign to'.Email = Result,DateDiff('Date closed',Deadline) < 0))}
    )
);
Set(variablename,Sum(collectionname,Num))

2. Add a Data Table Control and set its Items property to collection name.

3. Add a Label Control and set its Text property to variable name.

vyujincuimsft_1-1652238034856.png

 

 

Best Regards,

Charlie Choi

baterdene
Regular Visitor

I have solved in little bit complex way and it worked. Which i created 2 calculated column on my sharepoint list to fill the datediff with value "overdue" and "not overdue" and then i tried to calculate the datediff by filtering overdue status column. i'll try this code on my app it looks simple. Thank you

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Users online (4,101)