Start Free Trial

Alteryx Designer Desktop Discussions

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

Extracting the latest quarter value - Slice_tail (n=1) equivalent for Alteryx

himam
6 - Meteoroid

Hey everyone, I am transferring over from R Studio and trying to figure out a procedure I used to perform there. Basically I have a lot of different lines of business with earnings reported starting 2014 on a quarterly basis. I am trying to get the latest values. So my data looks like the following and the values I want to extract are the ones highlighted

 

himam_0-1679682442122.png

In R - dplyr, I can use group_by function to group different variables together then use slice_tail(n=1) to get the last value based on the groups I created. Is there something similar in Alteryx? 

 

Thanks in advance!

2 REPLIES 2
ChrisTX
16 - Nebula
16 - Nebula

Use the Summarize tool.  Group by Segment1 and Segment2, Max Qtr Count

Then use the Join tool .  Left input = original data stream.  Right input = output from Summarize above.  Join fields = all 3 fields from Summarize above.

 

If you post sample data as a table instead of picture, it's easier to provide a sample workflow.

 

Chris

Clifford_Coon
11 - Bolide

Hi, not that I'm aware of in a single tool,

You could sum group by Segments, max Qtr_Count, then join back to original.

Annotation 2023-03-24 150711.jpg

Labels
Top Solution Authors