Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody.
I'm not finding the right syntax.
I've got 2 data fields: data1 and data2.
I've create this pivot table :
Year(data1) | Month(data1) | code supplier | description supplier | GG | data2 | total |
---|---|---|---|---|---|---|
2016 | gen | 1 | abc | 15/01/2016 | 100 € | |
2016 | feb | 2 | aaa | 22/02/2016 | 100 € | |
2016 | mar | 3 | bbb | 19/03/2016 | 100 € | |
2016 | apr | 2 | aaa | 28/04/2016 | 100 € |
I've got difficulties to "write" the column GG.
It should be data2-max(data2 for prevous month).
I'm trying something like this GG = data2 - max{$<Month(data2)={Month(data2)-1} but it doesn't work.
Any help please ?
Many thanks
Marco
could you please explain the what is the max() month for the data 2 with the an example ?? because i am not able to understand your requirement
This could get complicated when you are having multiple dates per month. If you have only one date per month, as shown in your sample, try chart inter record functions like above():
=data2 - Above(TOTAL data2)
[Chart needs to be sorted by data2 ascending]
So I would suggest that you look into chart inter record functions and see if they might help you.
If not, please post a small sample QVW and your expected result for column GG.
Sorry Avinanash.
GG = data2 - max{$<mese={Month(data2)-1}data2
in the script I've got this:
data2table:
load Distinct data2,
year(data2) as anno,
Month(data2) as mese,
Week(data2) as settimana,
WeekDay(data2) as descgiorno,
Day(data2) as numgiorno,
QuarterName(data2) as trimestre
resident [Scadenze];