Announcements
MAINTENANCE ALERT: Dec. 12th starting 9 AM CET. Community will be read-only. GET DETAILS
cancel
Showing results for
Did you mean:  Master

## only last value

Hi Folks,

i have one problem,

i use this expression:

M2:

sum(aggr(rangesum(below(total sum({<Month=>}Amount),1,2)),Month)) ,it does work great,

but i want see only last value of selected period, how can i make invisible other value / or to set to Zero.

thanks a lot

beck

1 Solution

Accepted Solutions Anonymous
Not applicable

if(rowno(total)=noofrows(total),

sum(aggr(rangesum(below(total sum({<Month=>}Amount),1,2)),Month))

)

14 Replies  MVP

May be this:

FirstSortedValue(Aggr(RangeSum(Below(TOTAL Sum({<Month=>}Amount), 1, 2)), Month)), -Month) Anonymous
Not applicable

if(rowno(total)=noofrows(total),

sum(aggr(rangesum(below(total sum({<Month=>}Amount),1,2)),Month))

)  Master
Author

Sunny

Thanks a lot  Master
Author

Robin

Thanks a lot  Master
Author

Hi Robin.

i have one question, i have in this case two types of amount, and when i use the set expression, my expression doesnt work

2 types of my amount: UK and USA

i use this expression:

if(rowno(total)=noofrows(total),

sum(aggr(rangesum(below(total sum({<Type = {'UK'},Month=>}Amount),1,2)),Month))

)

do you have any idea?

thanks a lot

beck  Master
Author

Hi Sunny.

thanks for your feedback,  i have in this case two types of amount, and when i use the set expression, my expression doesnt work

2 types of my amount: UK and USA

i use this expression:

if(rowno(total)=noofrows(total),

sum(aggr(rangesum(below(total sum({<Type = {'UK'},Month=>}Amount),1,2)),Month))

)

do you have any idea?

thanks a lot

beck  MVP

Not certain, but may be this

If(RowNo(TOTAL) = NoOfRows(TOTAL),

Sum({<Type = {'UK'}>} Aggr(RangeSum(Below(TOTAL Sum({<Type = {'UK'}, Month=>}Amount), 1, 2)), Month)))  Master
Author

Hi Sunny,

thanks a lot for your help,

but i implemented this code in my expression, and it does not work

beck  MVP

When you say it doesn't work, do you mean it gives an error? doesn't show anything? show incorrect result? Community Browser