In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

How to calculate difference bet 2 months if only 1 month has value

bui195
メテオール

I'm trying to create a workflow to dynamically calculate month over month variance. My current formula only calculates the difference if the GL account and Client ID combinations exist in both current month and prior month. In the scenario that client ID and GL account combinations only exist in current month (or vice versa), it should take current month subtract 0, or 0 subtract prior month and show result in the MoM Variance column. 

 

Example below: 

 

Input:

 

bui195_1-1678739350334.png

 

 

Expected output:

 

bui195_0-1678739327057.png

 

3件の返信3
BS_THE_ANALYST
15 - Aurora
15 - Aurora

@bui195 should be completely dynamic. It also doesn't matter the order in which the effective dates are entered into the workflow.

BS_THE_ANALYST_0-1678741377759.png

 

 

All the best,
BS

LinkedIN

Bulien
binu_acs
ポラリス

@bui195 Another way of doing this

 

binuacs_0-1678744766739.png

 

bui195
メテオール

Thank you so much! This works really well and simplify my actual workflow. I have a follow up question tho. How can I dynamically re-order column if next month I add March and the report should show January, February, March (the end goal is to show January to December as we go toward year end). With the Tile tool, I can see we assign the 2 most current months number 1 and 2 and the previous months will be assigned 3, 4, 5, etc. With March data coming in next month, I see it will show 2/28/2023, 3/31/2023, 1/31/2023 then MoM Varianc column. Do you have suggestions on how I can dynamically move the previous months the beginning so the months will be in the correct order?

ラベル
トップのソリューション投稿者