Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sifatnabil
Specialist
Specialist

Percentage on chart expression with two dimensions

Hi all,

Normally with 1 dimension on a bar chart, we can get a "% of total" value at the bottom of each bar by ticking "invisible" and "text on axis" like below:

Capture.PNG

However, the % value does not work when using 2 dimensions. Is there any way to preserve the % values while having 2 dimensions?

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

Change the expression to calculate the total and only display for the first row

if(Rowno()=1,

sum(TOTAL <Sector> [Order size])

/

sum(TOTAL [Order size])

,'')

View solution in original post

7 Replies
PrashantSangle

can you provide sample data with required output???

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sifatnabil
Specialist
Specialist
Author

Hi, please see attached. I'm trying to get the % values on the second chart in my app, just like the first chart. The second chart has 2 dimensions.

stigchel
Partner - Master
Partner - Master

In display options remove the bar option, see attached

sifatnabil
Specialist
Specialist
Author

Thanks - however, when there are 2 parts on a bar chart, it's showing 2 %s, e.g. 20% and 7% in your attachment for Dimension "C". Is there a way for it to have a singular value = 27%?

stigchel
Partner - Master
Partner - Master

Change the expression to calculate the total and only display for the first row

if(Rowno()=1,

sum(TOTAL <Sector> [Order size])

/

sum(TOTAL [Order size])

,'')

sifatnabil
Specialist
Specialist
Author

That's awesome, thanks. I noticed that the %s aren't on the same horizontal alignment, is there a way to align them? Capture.PNG

stigchel
Partner - Master
Partner - Master

I don't think so...