# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Contributor

## Problem with sum

Hi,

I would like to have the sum that shows only values for the YearMonth that has maximum value. This YearMonth is generated by mastercalendar. I don't know what is wrong, but id doesn't work. if I take Max(YearMonth) separately it shows proper value i.e. 201609, but if it is in the formula shown below - it doesn't work.

sum(\${<YearMonth=\${Max(YearMonth)}>}Amount)

Maciek

Tags (1)
1 Solution

Accepted Solutions
Contributor III

## Re: Problem with sum

Try With this,

Your expression should be like this,

Sum({<YearMonth={"\$(=Max(YearMonth))"}>}Amount)

3 Replies
Highlighted
Contributor III

## Re: Problem with sum

Hi,

you have written wrong expr try this,

sum({<YearMonth={\$(=max(YearMonth))}>}Amount)

Regards,

Contributor III

## Re: Problem with sum

Try With this,

Your expression should be like this,

Sum({<YearMonth={"\$(=Max(YearMonth))"}>}Amount)

Highlighted
Contributor

## Re: Problem with sum

Both works fine thanks silambarasan1306‌ and pathiqvd‌.