cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx IN DB Latest 3 years score >=7

SOLVED
winniechoy
Meteoroid

Alteryx IN DB Latest 3 years score >=7

Hi All,

 

I would like to ask how to create a indicator by using IN DB Formula, 

define latest 3 years score >=7?

 

Any other suggestion with INDB tools are welcomed.

Many Thanks.

IDYearScore
120205
120216
120227
120238
120249
3 REPLIES 3
winniechoy
Meteoroid

Alteryx IN DB Latest 3 years score >=7

Hi All,

 

I would like to ask how to create a indicator by using IN DB Formula, 

define latest 3 years score >=7?

 

Any other suggestion with INDB tools are welcomed.

Many Thanks.

IDYearScore
120205
120216
120227
120238
120249

Re: Alteryx IN DB Latest 3 years score >=7

Hello @winniechoy 

 

Not sure to understand the wanted output. Could you please clarify?

Best regards,

Simon

Re: Alteryx IN DB Latest 3 years score >=7

outcome should be, as latest 3 years are both >=7 

IDIndicator latest 3 years >=7
1Yes

Re: Alteryx IN DB Latest 3 years score >=7

Something like that in SQL?

SELECT MIN(Score)<=7 AS Min_Score_Last_3_Years
FROM your_table_name
WHERE Year >= YEAR(CURDATE()) - 2;

 you would need first a filter in db to specify Year >= YEAR(CURDATE()) - 2
and then a summarize in db to aggregate your score to min
and finally a formula in-db for MIN(Score)<=7