Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to create a bar chart which shows the Month on Month added value.Ie.
The dimension would be MonthYear.
in Expression let say for 2015-12 it should show the sales which has been added compared to 2014-12,
sales(2015-12)-sales(2014-12) should be the added value for 2015-12.
How can i achieve the same.
Please suggest.
Regards,
Reena
Hi Reena,
Try using this :
RangeSum(Sum({<Year={$(=max(Year))}>}SALES), - Above(Sum({<Year={$(=max(Year)-1)}>}SALES), Count(DISTINCT TOTAL {<Year={'$(=max(Year))'}>} Month_AsOf)))
+ RangeSum(Sum({<Year={$(=max(Year)-1)}>}SALES), - Above(Sum({<Year={$(=max(Year)-2)}>}SALES), Count(DISTINCT TOTAL {<Year={'$(=max(Year))'}>} Month_AsOf)))
And for each type create different expressions eg Type={'ABC'}
Regards
KC
Hi,
You can try the following:
Current Year =Sum({$<Year={$(=Max(Year))}, Mon={$(=Month(Today()))}>}Sales)
Previous Year =Sum({$<Year={$(=Max(Year)-1)}, Mon={$(=Month(Today()))}>}Sales)
You can replace the function Today() with a date field
Provide sample data to work ! or may be your sample application
Hi Manish,
I have attached the sample data as well as Qvw.
Please find the attached.
Regards,
Reena
Try this expression:
sum({<Year={'$(=max(Year))'}>}Sales)
-
Above(sum({<Year={'$(=max(Year)-1)', '$(=max(Year))'}>}Sales))
sum({<Year={'$(=max(Year))'},{<Month={'$(=max(Month))'}>}>}Sales), sum({<Year={'$(=max(Year)-1)'},{<Month={'$(=max(Month))'}>}>}Sales)
Hi Sunny,
Thanks a lot for your reply.
With selections the expression is working. But if we are not selecting any Month then the chart is showin wrong results.
I have to show 2 years data without any selection and the chart should be independent of month selection. Based on selection of year it should show the same year data as well the previous year data.
Thank You
This may be:
sum({<Year={'$(=max(Year))'}>}Sales)
-
Above(sum({<Year={'$(=max(Year)-1)', '$(=max(Year))'}>}Sales), Count(DISTINCT TOTAL {<Year={'$(=max(Year))'}>} Month_Asof))
Hi Sunny,
Thanks again.
Now the values are appearing correct but it is only visible for year 2015..