Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

YTD Column not affected by current selection

Hello Friends,

I have a table that shows cost per month by account. The MTD column shown below is behaving correctly, i.e., it responds to the selections. However, the YTD column is calculating properly, but will show for omitted selections. YTD expression is below. Any help would be most appreciated. Thanks in advance!

=sum( {$<[MonthID] = {"<=$(=max(MonthID))"}>}  [Actual])

YTD.PNG

2 Replies
Highlighted

Two options

1)

=Sum({$<[MonthID] = {"<=$(=max(MonthID))"}>}  [Actual]) * Avg(1)


2)


=If(Sum(Actual) > 0, Sum({$<[MonthID] = {"<=$(=max(MonthID))"}>}  [Actual]))

Highlighted
MVP
MVP

I'm unclear what you mean, but maybe you want this - the intersection of the MonthID selections and your set expression.

sum({<[MonthID]*={"<=$(=max(MonthID))"}>} [Actual])