This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
So I found a tutorial which explained how to calculate the CRT and copied the logic in excel, then checked it with some of the examples given and it worked well. replicated it in Alteryx and could get the examples working in Alteryx but couldn't get the final answer exactly as required.
Imagine it's something to do with the modulo function on very large numbers losing a bit of accuracy, so got the exact answer using https://www.dcode.fr/chinese-remainder (my answer is out by 198).
Then added a generate rows to go 300 numbers either side of the output generated by Alteryx and then use a modulo on the numbers to find the answer which matches.
The part 2 in Alteryx looks like this:
Chris Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
When I need to use pen and paper I know I'm in trouble. What a brain melt! I did it baseA with an iterative, works with my input. Once the headache leaves, I'll try to read and see other people's solutions 😅
I began with pen and paper, then some excel(highlighted = 54):
I started with number 3, offset 0 number 5, offset 1 number 7, offset 2 number 11,offest 3
3&5 --> the first number that qualifies is 9 (mod(9,3) = 0 && mod(9+1,5)=0). Then I need to find a number that qualifies for (3,5) and 7. I start with the first number that qualifies for the previous condition, go in increments of (3*5) --will all keep qualifying for mod(z,3) = 0, mod(z+1,5) = 0 -- until I find one that qualifies mod(z+2,7) = 0 (the first number that qualifies is 54)
For the next, I'll start at 54 and increase in increments of 105 (3*5*7) until I find one that qualifies mod(z+3,11) =0. (789). And so on.
That part 2 really hurt my head. Discovered CRT after trying to find some relation between modulos and achieved to implement it in Alteryx but couldn't figure out the exact value. I guess it's due to accuracy problems, especially after @jdunkerley79 and @cgoodman3 replies. So used dcode tool to figure out the correct value. It's also on dcode that I studied and understood-ish the CRT.