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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Percentage in bar chart


hi All

I am trying to create a percentage chart   and was trying to use something like below. Its not working. Can anyone please help me in fixing this expression

sum(sales) /(sum(Total <productname> sales) + sum(Total <Productname , Sector ={'Marketing'}))

Labels (1)
4 Replies
mdmukramali
Specialist III
Specialist III

Dear,

sum(sales)

/

(sum(Total <productname> sales)

+ sum(Total <Productname , Sector ={'Marketing'}) sales)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Perhaps this:

sum(sales) /(sum(Total <productname> sales) + sum({<Sector ={'Marketing'}>}Total <productname> sales))


Make sure to use the exact case-senstive field names. Qlikview is case-sensitive with regards to field names.


talk is cheap, supply exceeds demand
its_anandrjs
Champion III
Champion III

sum(sales) 

/

(sum( Total <productname> sales) + sum(Total <Productname , Sector ={'Marketing'}   ?   ) )


I assume it is sales


sum(sales)

/

(sum( Total <productname> sales) + sum(Total  {< Productname=, Sector = {'Marketing'} >} sales   ) )


Or


sum(sales)

/

sum( Total { <productname=, Sector = {'Marketing'} >} sales




in Below expression in denominator where is the metrics you are forget to use any metrics there please check and let me know.

Not applicable
Author

Hi Sunny

Why don't you use productname as dimension and your formular would be like:

sum(sales)

you may use an additional formular:

sum({<Sector = {'Marketing'}>} sales)

Then in chart properties you check relative and your result will be a percentage...

Kind regards,

Anthony