See this blog post about aggr. The reason your set analysis expression doesn't work is that the set is calculated one time for the entire chart, not per row. So it can find only one max date, not a max date per month.
I further analyzed your example. It does not do what I want.
The problem is as follows: If a value does not exist for a client to date "x" value is displayed at the time "x-1". This is not good.
I would like to:
1. define the most recent date for the month of analysis (for example, if I have three analyzes in the month of March, 01, 08 and 15, you choose the date of March 15)
2. see all and only the values at that date (in the example cited above, March 15). If a customer has NO values at that date, must be seen zero (or blank), I do not have to display values that had March 8 or March 1;
For this reason, I wanted to first determine which was the most recent date for the month in question and then display all and only the values at that date.
I think I've solved the problem.
I created a computed dimension that determines the MaxData with aggr function, with the same dimensions of the analysis:
Subsequently I put in relation with the calculated expression
In this way, the computed dimension is constrained to only date values in the dimension DT_ANALISI_PORTAFOGLIO_KEY equal to maxdata.
See the pivot analysis named “Portafoglio mensile per cliente” in this datamart: http://files.mentelibera.it/htdocs/dm_portafoglio.qvw
I could not understand why your example shows only a customer…
Thanks for the tips on aggr ()
Da: Gysbert Wassenaar email@example.com
Inviato: venerdì 22 marzo 2013 13:08
Re: aggregations on the dates do not work as I would like to