Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Using In-Database tool to get the most recent date

Shivam
8 - Asteroid

Hi All,

 

Is there a way to get the most recent date partitioned by master date using In-database tool? I am trying to avoid using non-In-database tools since dataset is huge and want to avoid additional run time.

 

Sample In-db doesn't have group by option so I thought if there is a way to achieve the same using Formula-In db or any other db tool. My case looks like this -

 

Annotation 2019-12-17 092957.png 

 

i'd appreciate any suggestions.

 

Thanks.

3 REPLIES 3
fmvizcaino
17 - Castor
17 - Castor

Hi @Shivam ,

 

Attached is an example showing how to get that done. In my example, I'm using only tools and formulas available in in-database tools.

 

Let me know if that works for you.

Best,

Fernando Vizcaino

prozanini
8 - Asteroid

I believe you might be able to use a formula tool to create a flagging field for the samples you want (1 if first date in grouped by master date rows) and follow that by a filter in-db, but it will require some level of SQL code in the formula tool.

Shivam
8 - Asteroid

Thanks @fmvizcaino  and @prozanini. I used window function in In-formula and In-filter tool to get the desired output. 

Labels