Dynamically label years in a simple table
- 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
Dear Alteryx community,
I am trying to label years according to which financial quarter we are looking at to do some further analysis, so seeking your help for a simple and dynamic solution.
Context: The data structure will be similar for each quarter with the current always being in format of e.g. "Q3 2022E" with previous quarter being without the "E"
Examples for context:
- Q1 2022E -> "Current quarter", 2022E -> "Outlook"
- Q2 2022E -> "Current quarter", 2022E -> "Outlook"
- Q3 2022E -> "Current quarter", 2022E -> "Outlook"
- In the case of Q4 it's a bit different and would have to be Q4 2022E -> "Current quarter", 2022E -> "Full year", 2023E -> "Outlook"
- Q1 2023E -> "Current quarter", 2023E -> "Outlook"
What I have (data attached for your convenience):
What output I'm looking for:
Q3 | Q4 |
|
Hope you can help!
All the best,
David
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Gabriel,
Thanks a lot for your response! Could you try to attach the workflow you took a screenshot of? Looks like it's just the data I shared.
For a bit more background, data is collected on a quarterly basis (i.e. in Q1, Q2, Q3, Q4). However, to prepare different analyses I need to label the years for easier filtering later in the bigger flow. Hence, this post.
Best,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks a lot! What I did not explain 100% was that Q3 2022 and Q4 2022 are separate datasets. In addition, Q4 will occur in 2023, hence we cannot extract the current year using DateTimeYear. However, based on your good input I managed to modify the flow slightly so it works! Key changes below:
- Changed flow to extract the year and quarter from the "Q3 2022E" value, which will always be the current quarter and current year
Else worked super smooth. Attached!