Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Alteryx IN DB Latest 3 years score >=7

winniechoy
6 - Meteoroid

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
simonaubert_bd
13 - Pulsar

Hello @winniechoy 

 

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

Best regards,

Simon

winniechoy
6 - Meteoroid

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

IDIndicator latest 3 years >=7
1Yes
simonaubert_bd
13 - Pulsar

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

Labels