Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

How to display Winner of final and other details when there is no field other than Max(Date) specifying given match as final ?

Hi All ,

How to display below in text box using attached data set ?

In Year xxxx final was played between  Team X and Team Y where Winning Team was x or y with man of match as XorY  from team XorY .

NOTE: RECORDS HIGHLIGHTED IN YELLOW ,  IN ATTACHED DATA SHEET REFERS TO FINAL EVENT

Thanks & Regards

Shekar

12 Replies
prachisangewar
Creator
Creator

Hi,

Try to make variables for the Year and Date.

Attached is the solution.

Anonymous
Not applicable

!Hi ,

!

May be this will help you, I have also attached qvw

Define variables

vYear2008  =max({<Year={2008}>}date)

vYear2009  =max({<Year={2009}>}date)

vYear2011  =max({<Year={2011}>}date)


text box expression-


='Winner team  -'& only({< date={'$(=vYear2008)'}>}winner)

= 'Team 1  '&only({< date={'$(=vYear2008)'}>}team1)&'\nTeam 2 '&only({< date={'$(=vYear2008)'}>}team2)

='Winner team  -'& only({< date={'$(=vYear2008)'}>}winner)

cricket.PNG

rahulpawarb
Specialist III
Specialist III

Hello Shekhar,

As a workaround, I have added list box for the field Year and wrote below expression in Text Object.

='In Year ' & Max(Year) & ' final was played between '

  & FirstSortedValue(team1, -Aggr(MaxString(date), team1))  & ' and '

  & FirstSortedValue(team1, -Aggr(MaxString(date), team2))  & ' where Winning Team was '

  & FirstSortedValue(winner, -Aggr(MaxString(date), team2))  & ' with man of match as '

  & FirstSortedValue(player_of_match, -Aggr(MaxString(date), team2))

Please refer the attached sample application.

P.S.: Select Year from the list box and get the desired results for that year.

Hope this will be helpful.

Regards!

Rahul