Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have the following dataset, and in a straight table I'm trying to list out the month (as dimension) and the amount corresponding to the max day of each month as the expression.
LOAD * INLINE [
Month, Day, Amt
1, 1, 5
1, 2, 6
1, 3, 2
2, 5, 8
2, 6, 9
2, 7, 4
3, 8, 11
3, 9, 3
3, 10, 2];
So for month 1, the Amt value would be 2 (corresponds to day 3, which is the max day of month 1), for month 2 the Amt value would be 4, for month 3 the Amt value would be 2. If I'm using Month as dimension, what would I use for the expression to show the correct amount for each month? I suspect I should use set analysis and AGGR and the Only() function, but I haven't been able to figure out the right combination.
Thanks very much!
Robin
Hi
Try this
FirstSortedValue(Amt,-Day)