Calculation of Average Rate and Day Packages with hours
saikaruna.nimmala Jan 18, 2018 12:17 AMHello Everyone,
Could someone please help me with this?
The requirement is: When a user selects a month, the following should be displayed in the form of dashboard shown as below:
Ex:
Date Filter | Nov 1-30, 2017 |
dayof week | Average Rate |
Monday | 100 |
Tuesday | 200 |
Sunday | 300 |
Formulas:
Rate = countd(id)
I need to calculate rate of Sunday package, Monday package, Tuesday package
i.e. I need to calculate countd(id) of Sunday package, countd(id) of Monday package and countd(id) of Tuesdaypackage
Sunday Package --- Sunday 1pm-5pm which is eventhour Sunday 13,14,15,16 and
Saturday 10pm-2am Which is Saturday 10pm-11:59pm & Sunday 0-1am which is eventhour Saturday 22,23 & Sunday 0,1 and
Friday 12am-2am Which is all of Friday and Saturday 0-1am which is eventhour Friday 0-23 and Saturday 0,1
Monday package-- Monday 1pm-5pm which is eventhour Monday 13,14,15,16 and
Sunday 10pm-2am Which is Sunday 10pm-11:59pm & Monday0-1am which is eventhour Sunday 22,23 & Monday 0,1 and
Saturday 12am-2am Which is all of Saturday and Sunday 0-1am which is eventhour Saturday 0-23 and Sunday 0,1
Tuesday Package -- Tuesday 1pm-5pm which is eventhour Tuesday 13,14,15,16 and
Monday 10pm-2am Which is Monday 10pm-11:59pm & Tuesday 0-1am which is eventhour Monday 22,23 & Tuesday 0,1 and
Sunday 12am-2am Which is all of Sunday and Monday 0-1am which is eventhour Sunday0-23 and Monday 0,1
After calculating all the above, I need to calculate Average Rate
Average Rate = countd(id)/ no of Sundays, mondays, tuesdays in the week .
i.e. if the user selects Nov, 2017 then since no. of sundays in nov, 2017 is 4, the average rate is countd(id)/4
-
Book2.twbx 1.1 MB