Output with excel formula (days elapsed)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I need to have the output (Excel spreadsheet) contain an Excel formula to calculate the days elapsed based on today's date.
Column A: ID
Column B: Occurrence date
Column C: Days since occurrence date
In Excel I would put the following formula into C1 and apply to the remaining rows: =DAYS(TODAY(),B$1)
That way, each time the spreadsheet is opened, Column C reflects the number of days elapsed since the occurrence date. I know this calculation can be done in Alteryx but the result is static.
How do I do this in Alteryx?
Thanks!
A | B | C | |
1 | 123 | 20/09/21 | |
2 | 124 | 18/09/21 | |
3 | 125 | 15/09/21 |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can't create Excel formulas in Alteryx. I know what you want to do, but Alteryx doesn't work like that.
Check the solution below by @pdave87
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@lvoh Does below address your use case in Alteryx? Only caveat is - we have to 'Run' the workflow to create latest output in results window. Then we should see latest number of days elapsed since the date of occurrence. Let me know your thoughts 🙂 Happy solving!
Best from,
Pratik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
More advanced methods would be deploying Iterative Macros. That will 100% met your expectations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Can you explain how an iterative macro solves this problem ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@cmcclellan sure. By setting up iterative macro for same workflow, user will be able to generate the output for specific number of days elapsed inline with occurrence. However, the workflow needs to be executed (that's a manually intervention). The iterative loop will exit based on the condition specified e.g. after 5 days have elapsed from the date of occurrence in the below screen-print. Refer both Macro and Original workflow screen-prints.
Macro:
Original
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@cmcclellan I believe the steps in Excel vs. Alteryx are exactly same with or without Macro i.e. we open the days elapsed file in excel (with formula) likewise we execute the workflow (After importing the updated data). We can bring in new/updated data as a text input and set the exit condition via iterative macro (if required).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
But the question is ..... how to add formula into an Excel spreadsheet, The OP wants =DAYS(TODAY(),B$1) in Col C. A macro won't solve that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@cmcclellan Here we go...
Save Output as .xlsx (Every time user opens this output, xlsx will execute the referenced column)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That's great, I didn't know that 🙂
