Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Live Chat, June 29th 10AM ET. Bring your Qik Sense Enterprise, Client Managed questions! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
jelindbe
Partner
Partner

Display negative numbers as positive

I have a population chart. Men's values are displayed to the right and women's values to the left, with the following measures:

For men: num(sum({$<Kjønnskode={'1'},År={$(=$(vMidyear))}>} [Folkemengde_3112]),'#.##0;#.##0')  

For women: num(sum({$<Kjønnskode={'2'},År={$(=$(vMidyear))}>} [Folkemengde_3112])*-1,'#.##0;#.##0')

I want the chart to display negative values as positive and try to achieve this with the num funciton.

My problem is that the num function does not do what I want.  Something wrong with my use of the function? Any other solution?befpyr.png

 

Labels (2)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

14 Replies
Channa
Specialist III
Specialist III

try FABS

 

Channa
anushree1
Specialist II
Specialist II

Do not Multiply women values with -1 

Try : For women: num(sum({$<Kjønnskode={'2'},År={$(=$(vMidyear))}>} [Folkemengde_3112]),'#.##0;#.##0')

jelindbe
Partner
Partner
Author

That did not work. The numbers ended as genuine positive values and the chart displayed the sum of men an women. What I want is a pure display mechanism.

jelindbe
Partner
Partner
Author

No. Women's value must be multiplied by -1. If not, there will be no population pyramid.

tresesco
MVP
MVP

Number formatting should have worked. Could you please share your sample app to check?
jelindbe
Partner
Partner
Author

Where do I upload?
tresesco
MVP
MVP

Click on reply; in the new editor-> left bottom corner you would find a clip symbol to click on and upload 

jelindbe
Partner
Partner
Author

This took a while. I have now stripped down the app to include just the population pyramid. Any help would be welcome.

tresesco
MVP
MVP

It seems that you are not doing the number formatting at the right place. Use the num() around the expression that results in negative figures.