Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to make caption dynamic for two different dimension and also calculate sum accordingly.

Hi,

I have two dimensions in two different list boxes, Months and Years. I have a pivot chart where I am calculating the sum based out of these two dimensions. The dimension Months has values from 'Jan' to 'Dec' while Years has 2011, 2012 and 2013. Please find the attached image. Questions:

1) The sum of the chart should be displayed upon the combination of dimensions. For example: if I choose 2011, it should show  all months and total sale against each of them. Or, if I choose Month 'Feb' it should show all the years (2011 to 2013) and total against those individual years. And, if I choose both the Month and Year, the respective total should appear for the combination should appear.

2)I want to the caption dynamic containing whichever dimension I choose. In case I choose, both the dimensions both should appear in caption.

Thanks!!!

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

QlikView will aggregate values according to your selections, so that first point seems to be already fixed.

As for the dynamic caption, there are several ways to do it, here is one:

='Values for: ' & If(Count(DISTINCT Year) = 1, GetFieldSelections(Year),

     If(Count(DISTINCT Month) = 1, GetFieldSelections(Month)

     )

Miguel

View solution in original post

1 Reply
Miguel_Angel_Baeyens

Hi,

QlikView will aggregate values according to your selections, so that first point seems to be already fixed.

As for the dynamic caption, there are several ways to do it, here is one:

='Values for: ' & If(Count(DISTINCT Year) = 1, GetFieldSelections(Year),

     If(Count(DISTINCT Month) = 1, GetFieldSelections(Month)

     )

Miguel