Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
As per my requirement whenever i select a month , the bar should be available for only the month selected and the value should remain constant.
I have used rangesum in my expression ( we can also use full accumulation ).
Please find the attached sample application .
For example : if i select month of may , value should be 2620 with single bar.
Thanks in advance
For zero intervention on the script you have this approach (attached) using alternate states.
I hope you find this helpful.
Kind regards,
Nuno
Hi,
You could do it on the script like this and then use sum(value) as expression:
LOAD month,rangesum(peek(value),value_tmp) as value;
LOAD month,
count(SR_ID) as value_tmp
Resident MasterData
Group by month
Order by month;
Hope this helps.
Kind regards,
Nuno
Your data having ASSIGNED DATEs from January 2012, so when you group them by month i.e. Jan... the SR_ID count for Jan is actually for 2012, 2013 and 2014 which could be (may be) wrong..
Apologize if you are intended to show by the same way you have shown in bar chart...
If not, you need to create MonthYear or YearMonth field instead of only Month field...
You can create the same as below
Date(MonthStart(FLOOR(TimeStamp(ASSIGNED_DATE))),'YYYYMM') as YearMonth
Now you can use this field to create the desired result....
if 201405 selected, you should get date from 201401 to 201405 in a single bar...
Thanks for the response.
Is it possible to get it in the front end itself ? instead of aggregating in the back end.
Regards,
Simson
Obviously.... !
You need to create YearMonth in backend and use the dimension in front end to achieve the result...
For zero intervention on the script you have this approach (attached) using alternate states.
I hope you find this helpful.
Kind regards,
Nuno
Thanks Nuno.
But what if user selects more than one month ?
Regards,
Simson
Hi,
currently if the user selects more than one value it will show all moths.This doesn't work on more than one selection (for that you need the script approach).
My suggestion is that you use
=getselectedcount(month)<2
as the calculation condition and in the error message for calculation condition unfulfilled put something like:
'Please select only one month'
Kind regards,
Nuno