Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm running into a problem using the aggr-function in combination with set analysis. There are a number of selections possible, including YEAR. However, selection of a YEAR should not affect the outcome.
This is the expression I am using:
=aggr(NODISTINCT count({$<YEAR=>}ID),YEAR)
This is the outcome (selected YEAR is 2013):
GROUP YEAR #
A 2013 100
A 2014 -
B 2013 100
B 2014 -
This is what I would like to have (selected YEAR is 2013):
GROUP YEAR #
A 2013 100
A 2014 200
B 2013 100
B 2014 200
The expression is basically working, however it works only for the chosen YEAR. I think this has to do with the aggr-field YEAR that I use (without set analysis).
Could someone please help me? Thanks in advance!!
Regards, Janneke.
Try putting an Only({$<YEAR=>} around your aggr function.
COUNT({<YEAR = >}ID)
Hi Manish,
This gives the wrong amount, I think because GROUP and ID are from different tables.
Greetings, Janneke.
Can you post sample qvw
Try putting an Only({$<YEAR=>} around your aggr function.
Thank you Daniel!!
=only({$<YEAR=>}aggr(NODISTINCT count({$<YEAR=>}ID),YEAR))
works perfectly.
Regards, Janneke.