Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
We have one of the requirements where our data looks like below:
ID | Booking Actual | Total Seats | Budget Actual | Total budget rooms |
1 | 1200 | 5 | 1150 | 4 |
2 | 780 | 3 | 840 | 3 |
and we want to calculate formula in a script itself.
% Revenue= (sum(BookingActual)/sum(Total Seats) - sum(BudgetActual)/sum(Totalbudgetrooms)) / sum(BudgetActual)/sum(Totalbudgetrooms)
please suggest the same.
Hi,
if you want to Calcualte for each row % Revenue then you can use.
(([Booking Actual]/[Total Seats])-([Budget Actual]/[Total budget rooms]))/[Budget Actual]/[Total budget rooms] as Revenue.
if you have multiple rows for same ID then you have to use group by function .
let me know if you need something more.
Hi Virendra,
You can use the formula you have mentioned , aggregating the values by ID.
Load
ID,
(sum(BookingActual)/sum(Total Seats) - sum(BudgetActual)/sum(Totalbudgetrooms)) / sum(BudgetActual)/sum(Totalbudgetrooms) as [%Revenue]
Group By ID ; ....
Check if this is possible in your data model.
Best Regards,
Vikraant