Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple Alternate States

Hello, if someone could help me with this I would be so grateful.

In my model I have a dimension called "Type of Risk" which has only three different values (Market Risk, Institutional Risk and Aspirational Risk).

I have a sheet with three pie charts and three tables (one table and one pie chart for every type of risk), each of them has the same expressions but related to a different Type of Risk. I want to make the selection on every pair of charts independent to the others, so I created three alternate states (GrupoInstitucional, GrupoAspirational and GrupoMarket), and set every chart to the corresponding alternate state (under general tab). I also add to the expressions with set analysis the Operators to intersect the Group with the current selection.

The problem here is that when I try to select one value on the month field, all the expressions disappear, I've been trying to fix this for a couple of days but I can´t work it out. I think the problem is related to the selection of Month field instead of idFecha, because I´m using idFecha in the expressions with set analysis.

These are the expresions I use for each table:

1. Rentabilidad (It shows the profitability of the category (CHAABRA), during the whole selected period)

sum({GrupoIntitucional*$<TipoRiesgo={'Institutional Risk'}, idFecha={$(=Max(idFecha))}>} RentabilidadMesActual) / sum({[GrupoIntitucional]*$<idFecha={$(=Min(idFecha))}, TipoRiesgo={'Institutional Risk'}>} ValorTotalMesAnteriorCLP)

2. Valor (It shows the value of the investments in the max date selected)

=sum({GrupoIntitucional*$<idFecha={$(=Max(idFecha))}, TipoRiesgo={'Institutional Risk'}>} ValorTotalMesActualCLP)

3. Distribucion (It shows the percentage of the total investment that the current category has at the max date selected, they sum 100% for every type of risk)

=if(GetPossibleCount(CHAABRA)>1,aggr(sum({[GrupoIntitucional]*$<idFecha={$(=Max(idFecha))}, TipoRiesgo={'Institutional Risk'}>} ValorTotalMesActualCLP)/sum({[GrupoIntitucional]*$<idFecha={$(=Max(idFecha))}, TipoRiesgo={'Institutional Risk'}>} TOTAL ValorTotalMesActualCLP),CHAABRA),aggr(sum({[GrupoIntitucional]*$<idFecha={$(=Max(idFecha))}, TipoRiesgo={'Institutional Risk'}>} ValorTotalMesActualCLP)/sum({[GrupoIntitucional]*$<idFecha={$(=Max(idFecha))}, TipoRiesgo={'Institutional Risk'}>} TOTAL ValorTotalMesActualCLP),CodigoInstrumento))

In the sreecnshot 1 is the sheet with all the selections cleared, and in screenshot 2, I selected one month.

Thanks!!

1 Solution

Accepted Solutions
cfz
Former Employee
Former Employee

Hi Rafael,

This previous post treats the issue you are intersted in

http://community.qlik.com/message/410525#410525

I hope it helps.

Regards

Carlos

View solution in original post

8 Replies
Not applicable
Author

It may be difficult to help you if you will not share more informaion (application with sample data, data model etc.)

regards

Darek

Not applicable
Author

Ok Dariusz Mielczarek , here is the qvw file with the sheet that has the charts. It only has information in Nov-13, Dec-13 and Jan-14. As you can see the charts will show information only when you have selected the three months

regards

RAC

Not applicable
Author

May be I am being too complicated to explain, the only thing I need is to have a selection list box (with date field) where the selection apply to multiple alternate states, and not only to one. Is it possible?

Not applicable
Author

I cant find your attachment, but maybe this will help you.

regards

Darek

tresesco
MVP
MVP

I guess taking a look at trigger action - Copy State Contents, Swap State Contents could help you.

Not applicable
Author

Sorry,

have to go now....

Look here, please:

Living QlikView: Alternate States Use-Cases

cfz
Former Employee
Former Employee

Hi Rafael,

This previous post treats the issue you are intersted in

http://community.qlik.com/message/410525#410525

I hope it helps.

Regards

Carlos

Anonymous
Not applicable
Author

http://livingqlikview.com/alternate-states-use-cases/

This blog has moved and the page is now located here.