I’m encountering an error while creating a calculated field that uses a parameter. The error message is: “Expression {{argumentName}} for function {{functionName}} has incorrect argument type {{incorrectArgumentType}}. Function syntax expects {{functionSignature}}.”
Here’s what I’m trying to achieve:
I have a parameter that acts as a filter for the last 20 trailing weeks (weeks 16-35)
This parameter is connected to week number column from my dataset
When a user selects a week, I want to calculate:
The year-over-year difference for the selected week (2025 vs 2024)
The year-over-year difference for the previous week
Hi @auripol and welcome to the Quick Sight community!
I understand what you’re trying to do but there are other functions available that may assist with this type of requirement a bit easier.
Here is some documentation to review regarding period over period computations; there are various ways to handle this based on what works best for your data/scenario.
Based on your scenario, there can be issues with the periodOverPeriodDifference; if so I would suggest looking further into the lag function; the second document below is a prior community post that discusses the use of it further.
Let me know if one of these options works towards your case or if you have any additional questions
Following up here as it’s been awhile since we last heard from you; did you have any additional questions regarding your initial post or were you able to find a work around in the interim?
If we do not hear back within the next 3 business days, I’ll close out this topic.
Since we have not heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community.