Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am a new qlik view developer and I wonder if there is a way how to give a value in the expression when a dimension is collapsed.
For example, if we have 3 classes (a, b, c), when collapsed against it should appear value (6).
Dimension | Expression |
---|---|
a | 1 |
b | 5 |
c | 4 |
when collapsed it has to show:
Dimension | Expression |
---|---|
abc | 6 |
Thanks in advance and regards,
Stoyan
How did you get 6 for abc? It is clearly not the sum of 1+5+4, right? In addition, what is the dimension you are using and what is the expression? Would you be able to elaborate?
Hi Sunny,
Yes, 6 has nothing to do with the sum of the above, it is just a different value. The dimension is cyclic group and the expression I need to build and let's say I will use variable for it.
Thanks
So how did you come with 6? How does the two table provided above related to each other?
Hi Sunny,
The idea is that I have three regions - east, west and central. This region I use in the dimensions as column in the pivot table. Against these regions I have some actuals sales performed and I have targets for each region, as well as global target. I am taking the targets by region with variables (against each region I have some target shown, defined by the variable). However, I need to say to QV when the "Region" dimension is collapsed (i.e. we have the global actuals for the sales) to show the global target, which is a different figure.
Hope that this helps.
Thanks,
Stoyan
Maybe you used a dimension group "structure" with the fields:
global --> region --> area --> ...
and then you queried which value is displayed, like:
pick(match(getcurrentfield(structure), 'global', 'region', ...),
sum(TargetGlobal),
sum(TargetRegion),
...)
- Marcus
Hi Marcus,
Thanks for the idea, but it does not work in this case. It has to be using somehow the collapse function. Any ideas on this?
Thanks and regards,
Stoyan
Best would be you creates a small example with a few inline-data and a few screenshots or an excel to get an idea how the result should look like and which results you are expecting.
- Marcus