I am using set analysis, because I don't want data to be effeted when I select Last 3 Months,Last 6 Months or Last 12 Months. But my expression shows me correct data if I don't do any selections, but as soon as I select any of Last 3 Months,Last 6 Months or Last 12 Months the data gets changed according to selection made. I think the set analysis is not working because of 'aggr' function. But how can I make set anaysis work on aggr function?
Not sure if I can explain that better than the Help.
If expression evaluated to an unambiguous value in your context, this value will be returned, if it can only evaluate to ambiguous values, NULL is returned. Not so much different than just using expression.
But only() has one big advantage, it is an aggregation function. So you can use a set expression with only() function, and that's what needed here to disregard the selections in fields within the aggr() function.