Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
1. using Peek and Previous
a. generate the data <date,rain(yes/no)> for each day of 2015 such
that there are at least 80% days that are rainy.
01/01/2015 yes
the line above means that it rained on Jan 01,2015.
b. based on this data, for everyday calculate the consecutive number
of days it rained
c. finally create a table with maxdate, maxrun fields that contains
the date when the longest consecutive spell of rain ended, and the
number of consecutive days that it rained.
can you please help on this?
Can you explain more, i didn't get your concern? Please post sample application with expected o/p which demonstrates the issue?
Hi Anil,
by using auto generate we have to create the data in the script itself.
Yes, We can. Check this if helpful
LOAD Date(MinDate+IterNo()-1) as Date
While MinDate+IterNo()-1 <= MaxDate;
LOAD MakeDate(2014) as MinDate,
Today() as MaxDate
AutoGenerate 1;
Would you be able to provide a sample of few rows of data with your expected output to help you better here
It is unclear how Peek() and Previous() are related to your question. Please elaborate, and consider providing additional information.
Please have a look
Date | RainStatus | |||
1/1/2015 | Yes | |||
1/2/2015 | No | |||
1/3/2015 | No | |||
1/4/2015 | Yes | |||
1/5/2015 | Yes | |||
1/6/2015 | Yes | 80% | ||
1/7/2015 | Yes | |||
1/8/2015 | Yes | |||
1/9/2015 | Yes | |||
1/10/2015 | Yes | So I need 80 % of rainy days | ||
1/11/2015 | Yes | |||
1/12/2015 | Yes |
Why can't you just do this on a front end text box object:
Count({<RainStatus = {'Yes'}>}RainStatus)/Count(RainStatus)
that just for assumption for understanding the requirement i showed you date, rainstatus
with out any source can we create date and rain status fields by using auto generate or some other funtion
if you look at the qvw i created Date field like that
Please see attached on how to aggregate 83% rainy days for January.