Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have a small table and a Qlikview that uses apply map in the script. Items E and G are "fish", and both have the Classifications. So, in my .qvw file, this is not shown.
Is there a way out of this situation in this case?
item_id | Food_name | Food_Price | Classification | Classifications |
1 | hamburguer | 10 | unhealthy | |
2 | ice cream | 11 | unhealthy | |
3 | steak | 12 | unhealthy | |
4 | bread | 13 | healthy | |
5 | coke | 14 | unhealthy | |
6 | juice | 1 | healthy | |
7 | green salad | 2 | healthy | |
8 | mango | 3 | healthy | |
9 | ham | 15 | healthy | |
10 | cesar salad | 16 | unhealthy | |
11 | chicken | 8 | healthy | |
12 | fish | 8 | healthy | |
13 | tofu | 5 | healthy | |
A | juice | 0.5 | healthy | coke |
B | green salad | 1.5 | healthy | cesar salad |
C | mango | 2.5 | healthy | ice cream |
D | chicken | 7 | healthy | hamburguer |
E | fish | 7 | healthy | hamburguer |
F | tofu | 4 | healthy | hamburguer |
G | fish | 10 | healthy | hamburguer |
What exactly you want ?
Unclear from your question.
item_id = E and item_id = F are not shown in the dashboard in the "Food Price" table, inside the blue box called "Healthier Choices", I want those items to appear.
That table is trying to pull in the Food_Price_substitute field from your Menu-1 table. There are 2 "fish" records in that table that are identical except for Food_Price_substitute, so the chart does not know which price to use.
When this happens, QlikView inserts a null as it doesn't have the context necessary to complete the chart. You have nulls and zero values suppressed on this chart object (on the Presentation tab), so these rows are left out.
Is there a way of avoiding it, or as long as the names is the same, the problem will continue?
Is there a way of making this ApplyMap works using the item_id as key, so it doesn't mess with the names being the same?
Clark, can you tell me if there is a way out of this?
Julio,
Yes, you could use the item_id with applymap.
These records need to be unique in some way. If you were calculating this manually, how would you know what price to use for fish? I would recommend giving each of these fish items a different item_id since they have different prices and then using item_id when mapping.
I managed to solve this problem by doing a different thing. I moved "Food_Price_substitute" as a third dimension, instead of leaving it as an expression.
But thank you very much, it helped me.