Forum Discussion
ajinkya1907
8 years agoHelper II
Problem in selecting Max date
I have a table "matches" with below shown columns I have created calculated field Max_date = MAX(matches[date]) I have created a filter based on year. I want team1 value to be di...
- 8 years ago
Try this MEASURE to get the TEAM1 on maximum date
Team1 On MaxDate = CALCULATE ( FIRSTNONBLANK ( Matches[Team1], 1 ), FILTER ( ALL ( Matches[Date] ), Matches[Date] = MAX ( Matches[Date] ) ) )
ajinkya1907
8 years agoHelper II
Thanks for your quick response. Appreciate it !!
The solution which you provided gives attached error. Also we need to find out runner up as per last match in every year :-)
Data set is available at - https://www.kaggle.com/manasgarg/ipl/data
Zubair_Muhammad
8 years agoCommunity Champion
Add it as a calculated column.
Not as a measure
Not as a measure
- ajinkya19078 years agoHelper II
Thanks Zubair for your quick response.
I was looking for to achieve it with calculated measure. As no solution I can think about, I created new column as below
IPL_RunnerUp2 = IF(matches[team2]<>matches[winner],matches[team2],matches[team1])
and on that I applied max date logic as per your earlier suggestion for winner team. It worked fine for Runner up team. Thanks for your help.