Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
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

Re: YTD Column not affected by current selection

Two options

1)

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


2)


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

Highlighted
MVP
MVP

Re: YTD Column not affected by current selection

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])