Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #275: Greatest Common Denominator

AkimasaKajitani
17 - Castor
17 - Castor

My solution.

 

Saqueador
AkimasaKajitani_0-1625583965024.png

Outer Iterative Macro
AkimasaKajitani_1-1625584015412.png

Inner Iterative Macro (For getting GCD)
AkimasaKajitani_2-1625584028670.png
balajilolla
Asteroide
Saqueador
Solution Attached

balajilolla_0-1625590338611.png

 

apathetichell
Altair
Saqueador
four summarize tools do the heavy lifting..
phottovy
13 - Pulsar
13 - Pulsar

My solution:

 

Saqueador
I ended up using an iterative macro that follows the example of Euclid's algorithm from this link:

Greatest Common Factor (GCF, HCF, GCD) Calculator 

275.png


 

 

achillesjing
Meteoro

Here is my solution.

Kenda
16 - Nebula
16 - Nebula
Saqueador
Kenda_0-1625597363564.png

 

TonyA
Alteryx Alumni (Retired)

If there were more types of materials, I would have done this as a nested macro, but simpler here to just use the macro twice.

Saqueador
TonyA_0-1625600192162.png


TonyA_4-1625600812606.png
ggruccio
ACE Emeritus
ACE Emeritus

275!  Have we reached the summit?

 

Saqueador
Simple if you know how to use the Mod function.  Generated rows and divided by the row count to get Mod = 0 then only took the records that joined and used the Max.

ggruccio_0-1625601782545.png

 

 

 

youngk313
Asteroide

I have one easy solution which was getting the minimum difference between volumes. This makes the assumption that all datasets will have this format.

 

To be more general I created a Python script that checks the GCD for each group of volumes. 

JasonHu
Asteroide
Saqueador
workflow.png

Here is my submission.