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

General Discussions

Discuss any topics that are not product-specific here.

What is the most game-changing macro you’ve built in Alteryx?

LeahK
Alteryx Alumni (Retired)

 

GOT THOUGHTS.pngWelcome to this week's Thursday Thought!

 

To Macro or not to Macro, that is the question...  (not exactly, but you get the point)

 

Question:

How have you leveraged Macros to improve the overall efficiency of your workflows? What is the most game-changing macro you’ve built in Alteryx? 

 

Want to learn more about Macro’s? Check out @MattD’s Tool Mastery Series article: Tool Mastery | Apps and Macros

 

3 REPLIES 3
patrick_digan
17 - Castor
17 - Castor

@LeahK I love macros! In terms of efficiency, I would have to say a date conversion macro that I created wins by a mile. We're stuck in the stone age with system that breaks up dates into 4 fields: 2 digit century, 1 or 2 digit year, 1 or 2 digit month, 1 or 2 digit day. While the 4 fields have a common base (like RandomDateC for century, RandomDateY for year, etc.), there no consistency in the naming convention for century/year/month/day (FieldC, FieldCY, FieldCN, FieldCEN all represented Century in various tables.). They also use 99 to represent no end date 0 to represent no start date. My prior method was use a select tool to change the field name and type, then a formula tool like this: 

 

IF(tostring(C_EFF)="99") THEN "3000-01-01" Elseif tostring(C_EFF)="0" Then "1900-01-01" Else tostring(C_EFF) + PadLeft(tostring(Y_EFF),2,"0")+"-"+PadLeft(tostring(M_EFF),2,"0")+"-"+PadLeft(tostring(D_EFF),2,"0") ENDIF

I would then copy and paste this to other formula tools as needed (or use saved expressions thanks to @MarqueeCrew); however, there were 20 other people with Alteryx Designers who used similar (although different) formulas. That was when I created our dates macro:

Image and video hosting by TinyPic

 

You give it the century field, and it can figure out the year month and day fields to convert it to a proper alteryx date. It can also handle multiple conversions in one macro. This tool is now in the parse category for all our designers, and it has drastically improved accuracy and efficiency!

 

 

BenMoss
ACE Emeritus
ACE Emeritus

This is going slightly off topic because they didn't improve the efficiency of workflow design but they did massively improve the efficiency of our wider team.

 

Myself and a colleague worked on a project to develop a suite of Alteryx macrco's which created non standard tableau visualisation outputs (as a tableau workbook), mekkos, sankey diagrams and network charts for instance; chart plug-ins if you will.

 

The idea being that in the wider scheme of things these would be significant time-savers and also help standerdize reporting (the mentioned chart times being quite complex to build in Tableau).

 

The premise is quite simple.

 

You create a Template visualisation.

 

You input the workbook xml into alteryx.

 

You replace placeholders (field headers, the data source), with the naming conventions within your users new dataset.

 

You output the workbook xml.

 

Now it can quickly get complex as you add different aspects to your template visualisation but this project would never be manageable without Alteryx and I gathered a tremendous knowledge of the underlying xml of Tableau workbooks.

 

(Very similar to the 'Output Tableau Workbook' maro that exists in the Tableau and Alteryx macro pack).

 

We then went beyond 'chart plug-ins' to 'analytics plug-ins' developing macros that perform a specific type of analysis (comprising of a variety of output views in Tableau).

 

I'll try and get a live example at some point in the near future but I would have to do some work to de-sensitise the data.

 

Ben

 

 

 

 

joshuaburkhow
ACE Emeritus
ACE Emeritus

Sounds awesome Ben. Would love to see this :)

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
Labels