Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a field called "Age" with values ranging from 1 - 10,000. The age is in days. I want to create a multibox filter with this field but I want the age to be displayed in years when the end user clicks the drop down. So I need a way to categorize and say, 1 to 365 days = 1 year, 366 to 730 days = 2 years, etc. Do I do this with an inline table, if so, how do I construct that? thanks!
May be like this
Table:
LOAD RecNo() as Age,
If(RecNo() <=730, Ceil(RecNo()/30) & ' month/s', Ceil(RecNo()/365) & ' year/s') as Flag
AutoGenerate 10000;
May be like this
LOAD RecNo() as Age,
Ceil(RecNo()/365) as Year
AutoGenerate 10000;
is RecNo equal to my field "Age"?
RecNo() will create 1-10000 in ascending order... which will join to you main table which include Age.
so is this an inline table? do I put the word inline anywhere? does this go in the script?
You don't need Inline Table with 10000 lines to do what can be done with a simple load of 3 lines. and yes, this does go in the script
I gotcha. Now, is there a way to amend this so that of the values 0 - 730 days, it calculates the age in months, instead of years? I still want it to calculate years for any values over 730
How will you divide the values?
1-30 Month1?
31-60 Month2?
and so on....?
yes...
can I get the output to actually say "2 months", instead of just 2