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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
marjan_it
Creator III
Creator III

how to show percentage data in age pyramid bar chart?

Hi

H make a Age Pyramid bar chart like the image. it works good when I show data as integer but when I want to show data in Percent

the left Piece of bar chart shows negative percent data.

what can I do to show all data in positive percent?!AgePyramid.png

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

Ok, I would need to check why my suggestion did not work.

But you can make your approach work by changing the format code in number tab to

#,##0%;#,##0%;

i,e, specifiying a format for the negative values without a minus sign.

View solution in original post

6 Replies
swuehl
Champion III
Champion III

Try using the dual() function, like

=Dual( Num( Count(FIELD) / Count(TOTAL FIELD),'#.00%','.',','), -Count(Field) )

for the left side expression and

=Dual( Num( Count(FIELD) / Count(TOTAL FIELD),'#.00%','.',','), Count(Field) )


for the right side expression.


Disable the 'relative' option.

marjan_it
Creator III
Creator III
Author

I do this but it doesnt work. in this case shoe data in number not percent and show in negative.

swuehl
Champion III
Champion III

Could you upload a small sample QVW?

marjan_it
Creator III
Creator III
Author

Yes of course. this is my sample.

swuehl
Champion III
Champion III

Ok, I would need to check why my suggestion did not work.

But you can make your approach work by changing the format code in number tab to

#,##0%;#,##0%;

i,e, specifiying a format for the negative values without a minus sign.

marjan_it
Creator III
Creator III
Author

Thanks so much. this is work goood