Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I plotted a bar chart with -
Date/Week/Month/Quarter - as my Dimension (cyclic group)
Sum(CNT) - as my Expression
Now, the chart will look somewhat like(sample):
Now, if someone will change the cyclic group to Month/Week/ Quarter, it will automatically sum up all the values for that and will show the sum as a count.
But, the client needs me to show in the following way:
If a week is selected in x-axis - The bars for all the weeks shall show the max(date's) value for that week
If a month is selected in x-axis - The bars for all the months shall show the max(date's) value for that month...
Like for the above chart,
if the cyclic group is changed to month,
then it shall show
x-axis - May
y-axis - 1 (not 765454)
Hope I am able to explain my requirement here. Thanks.
Could you share your sample qvw?
May be create flags in the script... for example... for Month...
LOAD Date,
If(Floor(MonthEnd(Date)) = Floor(Date), 1, 0) as MonthEndFlag
FROM ...
and then in your expression
Sum({<MonthEndFlag = {"$(=If(GetCurrentField([GroupName]) = 'Month', '1', '*'))"}, WeekEndFlag .....>} Measure)
Hello Anjali,
can you share some sample data?
Best Regards,
Ashok
Hi Sunny,
I tried making flags too still no luck.
It is still giving the same count i.e 765455(sum of both days).
I am attaching the qvw for reference. Please let me know whats wrong here.
Thanks for all the help.
PFA
I guess I didn't really notice that what you wanted was not really MonthEnd... it was just the max value for the month.
May be try this
If(GetCurrentField([time]) = 'monthname',
FirstSortedValue(Aggr(Sum(CNT), REPORT_DATE), -REPORT_DATE),
Sum(CNT))