Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to add days to an existing date sequence with missing days?

yswaaij001
6 - Meteoroid

Hi everybody,

 

I am trying to build a tax compliance work flow that automatically retrieves fx rates from a website, which the work flow can subsequently append to existing invoices that were issued in another currency (invoices in EUR while tax reporting requires a local currency; e.g., SEK). This website does however not populate daily fx rates (see the output below in red color) as this specific fx rate does not always change on a daily basis. The missing dates cause errors when my workflow tries to append the fx rate for a missing day (e.g., an invoice dated on 2024-01-20). How can I add the dates 2024-01-20 and 2024-01-21 (plus other missing dates) to my overview below while allocating the oldest fx rate to those additional dates (e.g., 11.38 SEK in the example below)? I have attached the relevant part of my workflow as attachment to this question.

 

Date f/x rate (SEK)
2024-01-2311.347
2024-01-2211.3545
2024-01-1911.38
2024-01-1811.364
2024-01-1711.3925
2024-01-1611.3215
2024-01-1511.278


Don't have much experience with Alteryx yet, so I am hoping that someone can provide support on this query.

thx in advance.
 
Yvo van Swaaij
 
 
 
 

4 REPLIES 4
DataNath
17 - Castor

Hey @yswaaij001, how does this look? We can use the Generate Rows tool to do exactly what it says on the tin - fill missing values in this case. To explain the steps a little more I have:

1) Sorted by [Date] Ascending

2) Used a Multi-Row Formula to place the next day/row value next to the current

3) In the Generate Rows tool, used a condition where - if the day difference between this next [Date] and the one on the current line is more than 1 - we generate extra rows until that's no longer true

4) Used the Select tool to make this new, full date field the new [Date] column and removed the other temporary fields used to get to the final product

 

Hope this helps!

 

4040.png

aatalai
13 - Pulsar

 the TS filler tool can also provide you a list of dates between two dates, daily and excluding weekdays, that might be simpler

Hsolmaz
7 - Meteor

I can share another macro with you that downloads the fx rates between two dates from Yahoo Finance without any missing data. That might help. Reference topic

yswaaij001
6 - Meteoroid

thx very much!

this is highly appreciated and enables me to proceed with this workflow.

Labels