Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I need help with an expression please..
i have a QVW that looks at hotel rooms that go offline (Offline means unsuitable to sell the room-repairs etc)
I have to report on how many days a room is offline due to the room being upgraded.
So this is the expression i am using at the moment..
sum({<[Reporting Week]=, [Reporting Date]={'>=$(=date(vPrevMonthStart))<=$(=date(vPrevMonthEnd))'},[Reason Group] = {'Upgrade'}>} [Days Spent Offline])
So the above gives me a sum of days spent offline between a date range for the 'Upgrade' Reason.
But because of the way the data is, i get the wrong result.
Here is a how the data looks..
For each day the room is offline, the total number of days offline are put against the reporting date. so in the above data, on the 12/01/2013 room 32 went offline for 60 days. but the 60 days appear for every date in the date range until the room is put back 'Online'. the above expression is summing these up, so the 60 days offline now sum up to 720 days!
What i need is to get the total days offline but taking into account the hotel name, room number and offline date.
So for the above i should get a total days offline of 67 days.
Note: the date range uses the Reporting Date NOT offline date.
Can anyone help please?
what is the expression you have written for
vPrevMonthStart and vPrevMonthEnd
if the expression for above is starting with the = sign then remove the sign and try it.
other wise update some sample data.
HTH
Sushil
attached is a sample.
i have an = in the variables, it doesnt work without them. my issue is that it is summing every line where i only want it to sum each line of the max days spent offline for the distict offline date, hotel name and room number..
I think anyway!