Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have a situation where I have a list box named Quarter year, by the name you can except the values it can have like
Q1'12,Q2'12........., Q1'16.
Now I want to have a slider for this field where I want to select two Quarters and I want to run the analytics.
The problem I have is when go for the properties and select "field" in the slider nothing is shown on the slider and even the slider got struck.
As of now I maintaining it with numeric values for the thing to work, but is there a chance to make it work, the slider
or any other suggestion is suggestible.
Regards
KK
In your calendar LOAD statement, next to QuarterYear, add a field with a name like QuarterYearNum that contains Year()*10+QuarterNum, leading to values of 20141 for Q1'14 etc.
A field like that can be used in a slider.
Peter
Or even better, use the dual() function on top of my previous solution.
When creating QuarterYear, make sure that you have both a string value (e.g. Q1'12, Q2'12, ...) and a numerical value (e.g. corresponding with the previous = 20121, 20122, 20123 etc.)
In your LOAD statement, create the QuarterYear field as follows:
:
dual(StringVersionOfQuarterYear, NumericalVersionOFQuarterYear) AS QuarterYear,
:
Replace both placeholders in italics with the expressions that calculate the corresponding values.
That one can be used in a slider as well, as shown below:
Best,
PEter
Hi Peter,
I will try and get let you know the solution.
Thank You
Hi peter,
I have tried your solution , but I am not successful.This is my script.
FiscalCalendar:
load *,
dual(QuarterYear,Year * 10 +QuarterNo) as QuYr;
Load *,
right(Quarter,1) as QuarterNo;
Load *,
Year(FiscalDate) as Year,
'Q'&ceil(month(FiscalDate) / 3) as Quarter,
'Q'&ceil(month(FiscalDate)/3) & chr(39) & Right(Year(FiscalDate), 2) as QuarterYear,
'FY'&Right(Year(FiscalDate),2)&'P'& Num(Month(FiscalDate)) as Month,
//Date(MonthStart(TempDate), 'MMM-YYYY') As MonthYear,
//Week(FiscalDate) as Week,
//WeekDay(FiscalDate) as WeekDay,
//Week(TempDate) & '-' &Year(TempDate) as WeekYear,
Day(FiscalDate) as Day,
InYearToDate(FiscalDate, $(vToday), 0) * -1 as CurYTDFlag,
InYearToDate(FiscalDate, $(vToday), -1) * -1 as LastYTDFlag,
Year(YearStart(FiscalDate, 0, 4)) as FiscalYear;
Load
TempDate as ForecastDate,
AddMonths(TempDate,$(vMonthCount)) as FiscalDate
Resident TempCal Order by TempDate asc;
DROP TABLE TempCal;
And I have used QuYr for slider, but my slider is showing the numeric values rather than the string representation.
Any suggestions??
Weird. It does work for me, although the dual() function indeed makes the field act like a numerical value.
What happens if you select QuarterYear as slider field? Never mind the sorting order.
Peter
Hi peter,
The slider is showing alphanumeric for single value or multiple value mode but when I select continuous /numeric
value mode it is showing the numeric values like 20101, 20102....
In my application I want to show the forecast ... for the end user between any two quarters like Q114 - Q315.
I think you have go to it.
I will try to post a qvw, just give me some time.
i m having a query can u c it once kiran
Hi peter,
I checked ur sample thank you for providing it.
According to ur sample if we multi select I dont wont the range of values , I want the first and last Quarters.
In the above I want Q4'14 and Q2'15 but when I go for continuous value mode all string representation is converted into numberic.
If we take variables in the slider other than QuYR can we change achieve, i tried but what the "Step"should be.
Hi,
I didn't get you.