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 Platform Community / Forums / Power Apps / Service Ticket Model D...
Power Apps
Answered

Service Ticket Model Drive App Holiday and Weekend Bill Rate Based on Date Selected.

(0) ShareShare
ReportReport
Posted on by 6

I’m trying to build a model driven app for my company to track service ticket, time and expenses.

 

I have several tables, but here are they tables I’m currently focusing on building out: Technician, Time, Service Ticket.

 

On the Technician table I have a column titled Technician (Tech’s Name) and a column titled Bill Rate (Currency Field). I have a table titled Holidays, which has a Holidays column that consists of dates that are holidays like: 1/2/2023, 2/20/2023, 5/29/2023, 6/19/2023, 7/4/2023, 9/4/2023, 10/9/2023, 11/10/2023, 11/23/2023 and 12/25/2023.

 

On the Time table, which is linked to the Service Ticket table via lookup, there is a Date column.  How do I compare the date selected on the Time table to the dates on the Holidays table and if there is a match returned the selected Technician’s Bill Rate from the Technician table x 1.3 (effectively adding 30% to the Bill Rate).

 

I also need to do this if the date selected on the Time table is on a Saturday or Sunday.

 

Otherwise, I would like to just return the normal Bill Rate from the Technician’s table for the selected Technician.

I have the same question (0)
  • Mira Ghaly Profile Picture
    11,415 Moderator on at

    Hi @HSCNOrthAmerica 

    You need to use either JavaScript or Plugin to do that if you need this to be synchronous in the sense you need the user to see the calculation immediately, Alternatively you can use power automate to do the below logic:

    1. On change of the date field , you need to check if it is a holiday by checking if the date exists in your configuration table or check if it is Saturday or Sunday by checking the day of the week.

    2. Calculate the rate based on the above.

     

    If you know which approach you want to follow Synchronous versus Asynchronous I can help you by trying to replicate sample easiest will be using powerautomate 

     

  • HSCNOrthAmerica Profile Picture
    6 on at

    I don't need the user to see it. It's mainly for invoicing purposes when I bill the customer.

  • Mira Ghaly Profile Picture
    11,415 Moderator on at

    @HSCNOrthAmerica 

     

    So a powerautomate on the creation of the  service ticket would be the easiest approach,

     

    1. You can use day of the week expression to check on weekdays 

    Please check for more info on how to use it https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Power-Automate-Fundamentals-12-Usage-of-DayofWeek-in-Power/ba-p/1257521

    2. You can use list rows to check if the date selected in your service desk ticket is on holiday.

    https://learn.microsoft.com/en-us/power-automate/dataverse/list-rows

    Easiest approach to construct your advanced find download fetchxml and use it in your List Rows.

     

    https://learn.microsoft.com/en-us/power-automate/dataverse/list-rows

    3. Based on 1&2 use a compose operation calculate the rate.

    Hope this gives you an idea!

     

     

  • HSCNOrthAmerica Profile Picture
    6 on at

    So here’s what I did:

    Trigger: When a row is added modified or deleted

    Change type: Added or Modified

    Table Name: Times

    Scope: Organization

    Select Columns: Date

    List Rows

    Table Name: Technician

    Filter Rows: hsc_Name eq Technician (Value)

    Compose

    Select an output from pervious steps: Bill Rate x 1.3

    List Rows

    Table Name: Holidays

    Condition

    Time Table Date is equal to Holidays

    If yes… and this is where I get confused

  • Verified answer
    Mira Ghaly Profile Picture
    11,415 Moderator on at

    @HSCNOrthAmerica 

    Okay 

    • 1. Initialise a variable for the the additional rate if Holiday or weekend at the very top and set it to zero. .
    • After list Holidays, add a condition step to check the length of List Holidays if greater than 0 then in the yes set the rate variable to the extra 1.3
    • Repeat with another condition to check the week day

    At the end just multiply this variable with the Technician rate.

     

    •  
    •  

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard