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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to compare two columns in same table?

Hi,

    I have two column in same table like,TEAM_A and TEAM_B.I have joined in these two columns into one column as TOTAL_TEAM and COUNTRIES.Now i want to remove the selected value of COUNTRIES in TOTAL_TEAM column.For Example if i click 'india' in COUNTRIES,it should be only show the five counties name from TOTAL_TEAM with out the value of 'india',because india played only 5 match,Based on the Match_ID.

tt.JPG

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

May be use calculated expression for your list box for TOTAL_TEAM

Aggr(If(GetSelectedCount(COUNTRIES) = 0, Only({1} TOTAL_TEAM), Only{1<TOTAL_TEAM = e(COUNTRIES)>} TOTAL_TEAM), TOTAL_TEAM)

View solution in original post

10 Replies
sunny_talwar

May be use calculated expression for your list box for TOTAL_TEAM

Aggr(If(GetSelectedCount(COUNTRIES) = 0, Only({1} TOTAL_TEAM), Only{1<TOTAL_TEAM = e(COUNTRIES)>} TOTAL_TEAM), TOTAL_TEAM)

Not applicable
Author

Thanks for reply Sunny T, I got some error in this Expression like below,

rr.JPG

sunny_talwar

Does it not work when you click ok?

Not applicable
Author

Thanks Sunny Now it's work.Is it  possible for load script?

sunny_talwar

Isn't this based on selection? Are you planning to reload data after making selection in Country field?

Not applicable
Author

I have planned to use this Total_Team field into chart objects.How to use this column in Dimension Field. Aggr function is not convenience to Calculated Dimension.

sunny_talwar

You should incorporate the same logic in set analysis of your expression instead of using a calculated dimension.... something along these lines I guess

If(GetSelectedCount(COUNTRIES) = 0, Sum(Measure), Sum{<TOTAL_TEAM = e(COUNTRIES)>} Measure))

With TOTAL_TEAM as your dimension

Not applicable
Author

The result of the TOTAL_TEAM field may having a duplicate record. Aggregator function can remove the duplicates rows in chart objects due to associate with other dimensions.can you have anything else for this?

sunny_talwar

Do you have a sample you can share?