Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
To view sales data for previous months, I took as an example the discussion:
"Calculating rolling n-period totals, average ..." at: http://community.qlik.com/docs/DOC-4252.
Here is an example rolling 3 months.qvw.
In this example I do not understand why in the "Amount" of sheet 1, the expression sum ({} <Month=> Amount)
ottine is, for example, 6 for Month_AsOf = 1 and 10 for Month_AsOf = 2. Instead, see table "Details", I thought of having
values 12 and 14 and so on:
Mo0nth_AsOf Type Amount
1 Current 6
1 Rolling 3 6
2 Rolling 3 6
2 Current 4
2 Rolling 3 4
Why is this happening?
Hi,
1) Take care, Sales is dimensionned by Month. But your table is dimensionned by Month_Asof.
That does the link and the sum of the different months in the AsofMonth table. Each AsOfMonth value is linked to the appropriate month to do the sum.
In other words, for one AsOfMonth value, you will get N lines : 1 per month related to.
2) Another document with other examples
http://community.qlik.com/docs/DOC-4821
Fabrice
In this example I do not understand why in the "Amount" of sheet 1, the expression sum ({} <Month=> Amount)
That is so that selections in the Month field don't influence the straight table on the right that uses Month_AsOf as dimension instead of Month.
I thought of having values 12 and 14 and so on. Why is this happening?
Because the value Rolling 3 is selected in the field Type. That means only amounts from records with type Rolling 3 are summed.
Hi Gysbert, thank a lot
but where do you see that the field "Rolling 3" is selected?
I don't see this.
thank
In the Type listbox on the right:
Hi,
1) Take care, Sales is dimensionned by Month. But your table is dimensionned by Month_Asof.
That does the link and the sum of the different months in the AsofMonth table. Each AsOfMonth value is linked to the appropriate month to do the sum.
In other words, for one AsOfMonth value, you will get N lines : 1 per month related to.
2) Another document with other examples
http://community.qlik.com/docs/DOC-4821
Fabrice
Thank 1000
I did not understand clearly that, for each value of the field AsOfMonth is considered only one value of the field Month even if there are more than one in the table AsOfMonth.
Very Very Good