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: 
Saurabh07
Contributor III
Contributor III

To get overall sum of value despite of filter selection

Hi, Mentioned is the structure of my dataset;

Company_NameIDCountryValue
Company A1234India50
Company A1234Japan60
Company B4567India20
Company B4567Japan70

 

I have a filter at top to select Country. If I select 'Country = India' in the filter below is the desired output. In 'Company_Total' the value of India should be shown for each of the Company, but 'Total_Value' should display the overall sum of Value for each counterparty irrespective of the country.

Company_NameIDCompany_TotalTotal_Value
Company A123450110
Company B45672090

 

I tried using the mentioned expression for 'Total_Value' column, sum({<Country= >}Value)

But its not working! Can anyone please help me out here?

1 Solution

Accepted Solutions
sunny_talwar

@Saurabh07 May be try this

 

Sum({<Country, Company_Name = p(Company_Name)>} Value)

 

View solution in original post

4 Replies
sunny_talwar

This should have worked

Sum({<Country>} Value)

Do you have Country as one of your dimension? If you do, may be you will need this

Sum(TOTAL <Company_Name> {<Country>} Value) * Avg(1)
Saurabh07
Contributor III
Contributor III
Author

Hello @sunny_talwar , Thank you for the reply.

I tried this earlier, the value is correct in 'Total_Value' and 'Company_Total' columns, but all the other Company names are displayed in the table. eg. If India is selected in filter, Company C which doesn't belong to India is displayed in the table, though the value is shown as '-' in 'Total_Value' column, I don't want to see this Company C when India is selected.

sunny_talwar

@Saurabh07 May be try this

 

Sum({<Country, Company_Name = p(Company_Name)>} Value)

 

Saurabh07
Contributor III
Contributor III
Author

@sunny_talwar Thank you so much. This worked