Hello,
I need to get data from Aug 21 to Sept 21, but i dont want to use "Previous month", if not something like "current month -1", it´s possible?
Thanks
Hi @Luis98
Previous is the best way to go about it if you consider engine load on Anaplan but you can also use LAG or OFFSET. The least efficient would be to do a Month-1 and then lookup basis that.
There is a beautiful thread comparing these 4 functionalities which you can find here: https://community.anaplan.com/t5/Anaplan-Platform/Performance-Comparison-OFFSET-LAG-PREVIOUS-LOOKUP/td-p/51140
Let me know if this is helpful 🙂
@ankit_cheeni haha!
Assuming you have a date column named date_column in your database table, you can construct a query like this to retrieve b2b data enrichment from August 21st to September 21st of the previous month:
date_column
SELECT * FROM your_table WHERE DATE_SUB(CURDATE(), INTERVAL 1 MONTH) >= DATE_FORMAT(date_column, '%Y-%m-21') AND CURDATE() < DATE_FORMAT(date_column, '%Y-%m-21');
In this query:
CURDATE()
DATE_SUB(CURDATE(), INTERVAL 1 MONTH)
DATE_FORMAT(date_column, '%Y-%m-21')
The WHERE clause checks if the date in date_column falls between the first day of the previous month (inclusive) and the first day of the current month (exclusive), effectively giving you data from August 21st to September 21st of the previous month.
WHERE
You can adjust the your_table and date_column placeholders in the query to match your specific table and column names.
your_table
I want to create a line item which will increment by 1 every time an action is run manually. This action is an import which doesn't involve any file upload to anaplan. The module where I want this line item has users list & SKU list dimension. No time. So basically, I want to track how many users have selected an SKU and…
Hi Community, I’m encountering an issue where an export created in Anaplan is missing column headers when retrieved via the API. However, when I manually run the same export from the Actions tab, the downloaded file includes the headers. Has anyone experienced this behavior before? I’d appreciate any insights into the root…
When importing data from a Data Hub to another model, I'm seeing values in the target model that don't exist in the source. For example, seller assignments are being tagged with subregions that aren't present in the source data - some assignments are missing expected tags, while others are mapped to seemingly random…