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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
amrutha_sathish
Contributor II
Contributor II

How do i find % in a bar chart using set expressions?

So i have a bar chart showing trend of three months, containing 3 marketing channels - Search , Social , Display.

I need to find the % of each one of them - for eg.: Search% =  Search /Search+Social+Display.

What would be the set analysis expression?

Labels (2)
4 Replies
daturpin
Partner - Creator II
Partner - Creator II

So your dimension is months, and you have three measures: Search%, Social%, Display%?

All you should have to do is, in the expression editor for each measure, use:

=Sum([Search])/Sum([Search]+[Social]+[Display]) * 100 & '%'

 

cristianj23a
Partner - Creator III
Partner - Creator III

Hello, use this code:

Sum(Search) / (Sum(Search) + Sum(Social) + Sum(Display)) 

 

In the same graph you format the calculation:

 

cristianj23a_0-1691206684923.png

 

Regarts.

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
amrutha_sathish
Contributor II
Contributor II
Author

no no, so i have a dimension named 'marketing channel'

anat
Master
Master

assuming you have 'marketing channel' as a dim

and use below measure to show percent for dim values

num(sum(sales)/sum(total sales),'0.00%')