Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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

1 Solution

Accepted Solutions
swuehl
MVP
MVP

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
MVP
MVP

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
MVP
MVP

Could you upload a small sample QVW?

marjan_it
Creator III
Creator III
Author

Yes of course. this is my sample.

swuehl
MVP
MVP

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