Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to show 2 lines in one linegraph. I would like to compare the selected years sales per month versus the precious year sales per month. Here i have a small sample of my data:
Created | AmountFcExclVat |
2/20/2015 1:55:35 PM | 500 |
5/25/2015 2:33:15 PM | 400 |
5/26/2016 5:42:16 PM | 800 |
Showing one line with sales is no problem, I put in
Dimension: Created.autoCalendar.Month
Measure: Sum(AmountFCExclVat)
This gives me a line with monthly sales, which i can filter per year by using a filter.
What i want is the above linegraph with two lines, one line for the selected year and one line for the year previous to the selected year. What I've tried to show current year vs last year:
Dimension:
Created.autoCalendar.Month
Measure:
Sum({<Created.autoCalendar.Month= {$(=only(Created.autoCalendar.Month))}>}AmountFcExclVAT)
Sum({<Created.autoCalendar.Month= {$(=only(Created.autoCalendar.Month)-12)}>}AmountFcExclVAT)
use year field in set analysis:
current year expression - Sum({<Year= {$(=only(year))}>}Sales)
previous year expression - Sum({<Year= {$(=only(year)-1)}>}Sales)
use year field in set analysis:
current year expression - Sum({<Year= {$(=only(year))}>}Sales)
previous year expression - Sum({<Year= {$(=only(year)-1)}>}Sales)