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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

Is there anything wrong with my data model . Help with set expression !

Hi All ,

I want to find number of records (matchid) where toss_winner team is game winner ONLY IN FINALS .

But i think i am getting wrong data . Is this due to wrong data model or wrong expression .

COUNT MISMATCH.PNG

Thanks & Regards

Shekar

1 Solution

Accepted Solutions
sunny_talwar

May be this

=Sum(Aggr(if(

(FirstSortedValue({<season={$(#=Min(season))}>} winner, -date) = Only({<player={'$(ePlayer_of_final)'},match_id={'$(e_Match_Id_Final)'}>}TEAM) ),

Count(match_id)

), winner, toss_winner, match_id))

View solution in original post

20 Replies
sunny_talwar

May be this

=Sum(Aggr(if(

(FirstSortedValue({<season={$(#=Min(season))}>} winner, -date) = Only({<player={'$(ePlayer_of_final)'},match_id={'$(e_Match_Id_Final)'}>}TEAM) ),

Count(match_id)

), winner, toss_winner, match_id))

shekhar_analyti
Specialist
Specialist
Author

Thank you sunny bhai ..

ALSO ...I want to find number of records (matchid) where toss_winner team is game winner ONLY IN FINALS .

sunny_talwar

How to you identify finals here? I have not looked at all the fields, but what is the identifying field here?

shekhar_analyti
Specialist
Specialist
Author

basically those recs where (tos_winner=winner)

shekhar_analyti
Specialist
Specialist
Author

Ok ..

Max(date)  is actually finals within each season . Season is nothing but year .

Ex - In season 2008 .. 5/9/2008 is final , since its highest among all dates of season 2008 . Unfortunately i have not created any flag .

sunny_talwar

Checking now... unless this is resolved?

shekhar_analyti
Specialist
Specialist
Author

Ok .

Actually requirement is to find

a) winning percentage of teams who won toss vs those who have not won toss IN FINAL

b) a) winning percentage of teams who won toss vs those who have not won toss IN League Matches ...

sunny_talwar

Checking.... does this data include today's match between KKR and DD?

shekhar_analyti
Specialist
Specialist
Author

No Bhai ... its old . But i found interesting .


Please let me know if you  know any site from where from where we can download ball by ball data of match ..