cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vffdd
Super User
Super User

Using a slider as progress bar with dates

So I'm using a slider to measure progress against SLA dates.  I followed this video https://youtu.be/rkENxo2_PX8 to find out how to do it but I had to adjust slightly to take business days into account and not just regular days.

 

I have no errors and I feel it's almost there.  I think the max is fine however it's just not working correctly so I think the issue is at the "default" for the slider.

 

So for Max I have this  

 

 

RoundDown(DateDiff(DPAssigned.SelectedDate, DPCurrentSLADate.SelectedDate, Days) / 7, 0) * 5 +Mod(5 + Weekday(DPCurrentSLADate.SelectedDate) - Weekday(DPAssigned.SelectedDate), 5)

 

 

and at Default I have this

 

 

DateToday-DPAssigned.SelectedDate

 

 

which I know is not right as it's too simplistic ! and it doesn't take business days into account.  I've tried numerous combinations but no joy.

 

The 2 date fields that being compared are  DPAssigned    and DPCurrentSLADate    both Date picker fields and I need the slider to show me visually where I am today based on those dates...

 

Any ideas?

 

TIA

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @vffdd ,

 

The Default property (the day difference between today and the first day) should also take business days into account.

Please modify the Default property as follows.

RoundDown(DateDiff(DPAssigned.SelectedDate, Today(), Days) / 7, 0) * 5 +Mod(5 + Weekday(Today()) - Weekday(DPAssigned.SelectedDate), 5)

 Sik

View solution in original post

2 REPLIES 2
v-siky-msft
Community Support
Community Support

Hi @vffdd ,

 

The Default property (the day difference between today and the first day) should also take business days into account.

Please modify the Default property as follows.

RoundDown(DateDiff(DPAssigned.SelectedDate, Today(), Days) / 7, 0) * 5 +Mod(5 + Weekday(Today()) - Weekday(DPAssigned.SelectedDate), 5)

 Sik

Thanks Sik, I actually had that originally and didn't think it was what I wanted, but on closer checking it actually is !  I probably just needed external confirmation !! 🙂

 

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,778)