# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for
Did you mean:
Partner - Contributor

## Applying an alternate state in set analysis : Problem

I'm having some trouble with a formula that combines set analysis and alternate states.

I'm using a container box, which is set to an alternate state.

The regular formula needs to show the #FTE valid for the current month/year.

sum({<Year={\$(=Max(Year))}, [Calender.MonthNr]={\$(=Max([Calender.MonthNr]))},  [KPI Code]={'FTE'}>}[KPI Actuals])

Now; the problem is that I have a generic month & year in the report and I want the formula, which is part of of the alternate state, to respond to the proper max month selected.

Normally you can override the alternate state with Year= \$::Year

I do not know how to properly apply this is the current situation though.

sum({<Year={\$(=Max(Year##INDEFAULTSTATE##))}, [Calender.MonthNr]={\$(=Max([Calender.MonthNr##INDEFAULTSTATE##]))},  [KPI Code]={'FTE'}>}[KPI Actuals])

Anyone know how to properly get this chart to work from the container that is in an alternate state?

1 Solution

Accepted Solutions
MVP

May be this?

sum({<Year={\$(=Max( {\$} Year))}, [Calender.MonthNr]={\$(=Max({\$}[Calender.MonthNr]))},  [KPI Code]={'FTE'}>}[KPI Actuals])

2 Replies
MVP

May be this?

sum({<Year={\$(=Max( {\$} Year))}, [Calender.MonthNr]={\$(=Max({\$}[Calender.MonthNr]))},  [KPI Code]={'FTE'}>}[KPI Actuals])

Partner - Contributor
Author

This is correct ! Thanks you!

Community Browser