Qlik Community

Qlik Sense App Development

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

Announcements
Announcement: Certain actions are currently causing a Page Not Found error. This is a known issue and we are working with the platform vendor to investigate and resolve it.
leivers1
New Contributor

Bar Chart - Add Calculation to X-axis Label

Hi,

 

I have a bar chart with a Number (y axis) and a Project name (x axis). See picture.

There are 2 bars. I would like to be able to calculate the percentage from these two bars. % = (orange/Blue value ) and have this percentage present along the x axis alongside each project name like after the project name text.

I have tried some ways i found on the forum top get it to appear after the project name text but could not get it working correctly

 

Is this possible?

 

Thanks

 

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Bar Chart - Add Calculation to X-axis Label

Yes, by replacing the x axis dimension with an Aggr calculated one, something like this:

=Aggr(
  Only({{x axis dimension}})&' '&Num(({{orange formula}} / {{blue formula}}), '#0%'),
  {{x axis dimension}}
)

Of course replace the {{}} parts by appropriate field names of formulas

2 Replies
Highlighted
Partner
Partner

Re: Bar Chart - Add Calculation to X-axis Label

Yes, by replacing the x axis dimension with an Aggr calculated one, something like this:

=Aggr(
  Only({{x axis dimension}})&' '&Num(({{orange formula}} / {{blue formula}}), '#0%'),
  {{x axis dimension}}
)

Of course replace the {{}} parts by appropriate field names of formulas

leivers1
New Contributor

Re: Bar Chart - Add Calculation to X-axis Label

Great! That Works.

 

THanks