13 Replies Latest reply: Jun 15, 2016 6:32 AM by Sangram Reddy

# Title Stacked Bar and Period percentage

Question 1

I want to show a bar chart and by selecting a period (ReportDate) the title of the bar chart need to change with the selecting period.

Example:

ReportDate

20151231

20160131

20160229

20160331

Title:

Credit rating period: 20151231

By selecting the ReportDate 20160131 the title has to change in:

Credit rating period: 20160131

What formula in Qlik Sense can I use?

Question 2

How can I display the percentages of each ReportDate to 100%. Now it is showing for each period the percentage of the total of all the values for the periods 20151231, 20160131.

What formula can I use in Qlik Sense?

• ###### Re: Title Stacked Bar and Period percentage

What is the expression you are using currently for calculating %ages? Don't have an answer for your question1

• ###### Re: Title Stacked Bar and Period percentage

Dear Sunny

Please see the expression I use:

Sum({<ASSET_GROUPING_NAME = {"Fixed Income"}>} MARKET_VALUE_APG_BASE)/Sum (total { <ASSET_GROUPING_NAME = {"Fixed Income"}>} (MARKET_VALUE_APG_BASE))

• ###### Re: Title Stacked Bar and Period percentage

Try this:

Sum({<ASSET_GROUPING_NAME = {"Fixed Income"}>} MARKET_VALUE_APG_BASE)/Sum (TOTAL <ReportDate> {<ASSET_GROUPING_NAME = {"Fixed Income"}>} (MARKET_VALUE_APG_BASE))

• ###### Re: Title Stacked Bar and Period percentage

Dear Sunny

Thanks this works, the only thing I am missing now are the percentages of the different rating classes (AAA,AA,A,BBB,BB).

Best regards

Xandro

• ###### Re: Title Stacked Bar and Period percentage

What did it give you? Can you share a screenshot of what you have now?

• ###### Re: Title Stacked Bar and Period percentage

See above

• ###### Re: Title Stacked Bar and Period percentage

I think you changed from grouped bars to stacked bars. I don't really know Qlik Sense well enough to provide an answer for this without playing around with it. May be Chandrasheker or reddys310 can help here

• ###### Re: Title Stacked Bar and Period percentage

Hi,

In qliksense once you stack your measures it will total and display as label but once you put the pointer on the stacked bar it will display the separate measures and percentages... If you put as a group then all the measures will appear separately ... This is just how the appearance of the chart in qliksense nothing to do with the formula..

Thanks

• ###### Re: Title Stacked Bar and Period percentage

Hi Xandro,

Question1 : you can make use of getfieldselections() in the title function to achieve this.

ex:getfieldselections([`Date Status`])

Question 2 : make use of a stacked bar chart which will show the over all total as 100% and when you hover over the segments you will be able to find the segment %s.

• ###### Re: Title Stacked Bar and Period percentage

Hi Are you expecting some thing like this first screen shot as it is without filter:

Now I chose month January look at the behaviour and heading of the chart screen shot below:

Please let me know if this what you are looking for..

Thanks

• ###### Re: Title Stacked Bar and Period percentage

For the title this should be correct. Thanks.

• ###### Re: Title Stacked Bar and Period percentage

On the right hand side pane there is an option for Appearance and below that title and there you can give expressions for your heading .. I have used ='Month'& MonthName

Thanks

• ###### Re: Title Stacked Bar and Period percentage

Hi,

Please mark the response as helpful or correct answer so that it will help the other members of the community to refer and not to spend more time over the post...

Thanks