Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

EXCEL: Only show Data from the Previous month (Sort Descending-no zeros)

neromerob
10 - Fireball

Hello to everyone.

I have a table showing information of several month including the current one

But I need to get ONLY the information regarding the previous month without considering the rest, and also not considering when the month is showing zero values, Sort Descending.

 

My problem is because the month changes I don’t know how to do it, this should be dynamic.

 

The output should look like this.

 

p_month.jpg

 

I add a sample table for your consideration (with the rest of the months including the current one). 

 

Thank you so much. 

 

 

18 REPLIES 18
kathleenmonks
Alteryx
Alteryx

Hi @neromerob 

 

See my workflow attached. The steps I took: 

  1. Transpose the months
  2. Separate out the month and year
  3. Compare the month and year to the previous month and year (accounting for Jan ->Dec)
  4. Filter data that is not from previous month
  5. Crosstab back to original format
  6. Filter out zero values
  7. Sort Descending
neromerob
10 - Fireball

Hi @kathleenmonks 

 

I saw the workflow but there something i don´t understand. 

 

question.jpg

for what I see, may is fixed to be previous month, meaning that when June becomes the Previous month i will have to change it manually, not quite sure how to do that dynamic. 

 

Thank you again. 

kathleenmonks
Alteryx
Alteryx

@neromerob  Good catch! We can just move the filter and sort to before the crosstab. See attached. 

binuacs
20 - Arcturus

@neromerob One way of doing this with the dynamic select tool, the sorting part also dynamic

binuacs_0-1656626442780.png

 

DataNath
17 - Castor

Not sure if I've maybe misunderstood but this shows only the most recent month where there are no 0 values and then sorts that month descending. From the wording I couldn't work out whether you meant that or keep the month even if all values are 0, in which case the others' solutions would work fine.

 

DataNath_0-1656627071119.png

 

neromerob
10 - Fireball

Hello @kathleenmonks 

 

thank you for your effort. 

 

I have see that now is dynamic but like in the workflow of @binuacs  the value of the month are not sort. 

 

check_2.jpg

 

It´s like the sort before the summarize looses effect in the final result 

 

Thank you for your help and time. 

 

 

 

 

 

 

neromerob
10 - Fireball

Hello @DataNath 

 

I test it with the real data, it show me short descending, but it shows me January_2022 instead of May_2022

binuacs
20 - Arcturus

@neromerob Do you mean my workflow is not sorting your data?

neromerob
10 - Fireball

hello @binuacs 

 

Let me show you the result 

 

sort.jpg

Labels