Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Field in chart to be in another alternate state

Hey guys, in the attachment we have a chart in the third blue box called "Saving", and in there we have a field called "item_id", which i've been trying to make it to be shown in the "Healthy_Food_State" alternate state (so that would have something related to the other chart in the second blue box called "Food Price").

Thing is, it is showing only as if the item_id is in the other state (I created another one called "Regular"). I don't really understand why...

One example: First, in the first blue box table choose "Hamburguer". Then in the second blue box choose "Hamburguer replacement". The "Food Price" table in the second blue box will start showing the item_id for the foods. That's the item_id I want to be shown in the third blue box. In fact it is showing item_id from "Hamburguer" (item_id = 1, as you can see in the chart called "Saving".).

So, can you guys help me out to script this?

3 Replies
Not applicable

Re: Field in chart to be in another alternate state

Sorry guys, I forgot uploading the document....

Honored Contributor II

Re: Field in chart to be in another alternate state


I don't understand what you are trying to achieve. You said that you want to see F, E,  G, D in Saving. But how it could be as these values is connected with null customer. You have to load replacements into floating table.

Seems that your data model doesn't reflect your task requirements. 

Not applicable

Re: Field in chart to be in another alternate state

Like this whiteline, imagine you pick hamburguer (it is an unhealthy food), the item_id for hamburguer is "1". That's what it does the first blue box.

In the second blue box i created another alternate state, called healthy food, and I use the same field, with hamburguer, I just concatenated in the end a "replacement", so it appears "hamburguer replacement". The chart in the second blue box appears the replacements possible for hamburguer (in this case is fish (item_id = E or F), tofu (item_id=F) and chicken (item_id=D).

In the third bluebox I show how much it would cost (or save) in terms of money choosing the healthy food. Thing is, I can show the way I want, but I can't show the item_id of the healthy food, it keeps either coming wrong with id from hamburguer (wich is not from the healthy food state), or it keeps bringing wrong calculation...

Can you understand  my problem? I am unable of bringing item_id in the healthy food state... i tryed outside the chart, and it didn't work either (i mean by using formulas).

Thank you very much for helping me...

Community Browser