Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

hacr-sds
Contributor

Add member (sum of other members) to a dimension?

Hi all,

I'm not quite sure how to formulate this question, but wondering if it's possible to manipulate Dimension in a way, so a new member is added?

If I have a dimension REGION:

Load * inline

[

Region

a

b

c

d

];

Is it possible to modify this dimension to include a member "All Regions", which equals a-d all together ?

Could it be made in a calculated Dimension, in the load script, or in the Graph itself?

I would like to have a Member called ALL Regions and be shown as a bar with 104 in the simple graph below. Is it possible?

a.png

1 Solution

Accepted Solutions

Re: Add member (sum of other members) to a dimension?

You could add such a dimension value:

Load * inline

[

Region

All Regions

a

b

c

d

];

and query then this value within the expression like:

if(Region = 'All Regions', sum(TOTAL AnyValue), sum(AnyValue))

- Marcus

4 Replies

Re: Add member (sum of other members) to a dimension?

You could add such a dimension value:

Load * inline

[

Region

All Regions

a

b

c

d

];

and query then this value within the expression like:

if(Region = 'All Regions', sum(TOTAL AnyValue), sum(AnyValue))

- Marcus

hacr-sds
Contributor

Re: Add member (sum of other members) to a dimension?

Hi Marcus, thanks for a quick reply!

It almost did as expected. Except all 5 bars got the same value. I'll read up on the TOTAL modifier to see how it impact.

Is it possible to generate the "All Regions" in an expression or otherwise? The INLINE example was to make a quick example, but the actual DATA for the dimension is read from an already defined table.

Re: Add member (sum of other members) to a dimension?

Yes, you might need to adjust the TOTAL to the right dimensions. Adding such an artificial value to a field is quite easy with something like:

concatenate(YourTableWithTheRegionField)

Load * inline [

Region

All Regions

];

Before doing this go into the chart-properties if there isn't an option to display additional the totals - within QlikView there is such option by Qlik Sense I'm not sure if it's already implemented.

- Marcus

hacr-sds
Contributor

Re: Add member (sum of other members) to a dimension?

Thank you for the answers and solutions. I'll look more into it from here!

Community Browser