Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create in a table relative % against totals

Hi,

I'm trying to créate a table like the following one, showing an additional column with the % of the line agains the total. A relative figure. How can I build this column?

Thank you very much!

                      Sales           %

James               10            17%

John                  20            33%

Katherine          30             50%

Total                  60            100%         

15 Replies
sunny_talwar

To remove, you can use set analysis. Stefan has provided one expression, you can use that or this:

Sum({<NameField ={'*'}-{'Ben'} >} Sales) / Sum({<NameField = {'*'}-{'Ben'} >} TOTAL<Year> Sales)

His expression will still allow for selection in NameField, the above will always show all NameField except Ben even if you make selection in NameField.

Not applicable
Author

Thakn you very much! this worked perfectly!

Have all a nice weekend!

Not applicable
Author

Thank you very much!

Not applicable
Author

It worked!

Now i'm facing the following issue. Im trying to get out also a year out of the table. It is "date.autocalendar.year". How can I add an AND clausure here? I've tried a lot of options, the tool marks them as correct in terms of format but finally there is no effect.

Thanks again.

Nico.

sunny_talwar

May be this:

Sum({<NameField ={'*'}-{'Ben'}, date.autocalendar.year = {2016}>} Sales) / Sum({<NameField = {'*'}-{'Ben'}, date.autocalendar.year = {2016}>}TOTAL<Year> Sales)

Not applicable
Author

Thank you again, it worked.