Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I have several budgets (with a given amount) per year, and I need to display in a table chart the last budget amount for each year.
Example of data :
YEAR | BUDGET NUMBER | AMOUNT |
---|---|---|
2016 | B1 | 100 |
2016 | B2 | 110 |
2016 | B3 | 120 |
2017 | B4 | 200 |
2017 | B5 | 120 |
2017 | B6 | 900 |
What I would like to get, based on budget number :
YEAR | BUDGET NUMBER | AMOUNT |
---|---|---|
2016 | B3 | 120 |
2017 | B6 | 900 |
I have no problem to have the correct budget number (in dimension) :
=Aggr(MaxString([BUDGET NUMBER]), YEAR)
But I don't know how to do to get the correct amount. I tried the following expressions :
=SUM( {< [BUDGET NUMBER] ={$(=MaxString([BUDGET NUMBER]))} >} [AMOUNT])
=Sum({$<[BUDGET NUMBER]={'$(=MaxString(Aggr(MaxString([BUDGET NUMBER]), [YEAR] )))'} >}[AMOUNT])**
Any help will be really appreciated
Or this
Dimension
YEAR
=Aggr(If([BUDGET NUMBER] = MaxString(TOTAL <YEAR> [BUDGET NUMBER]), [BUDGET NUMBER]), YEAR, [BUDGET NUMBER])
Expression
=Sum(AMOUNT)
May be like attached
Or this
Dimension
YEAR
=Aggr(If([BUDGET NUMBER] = MaxString(TOTAL <YEAR> [BUDGET NUMBER]), [BUDGET NUMBER]), YEAR, [BUDGET NUMBER])
Expression
=Sum(AMOUNT)
Thanks a lot, it works like a charm