Parameter filter based on calculated field not refreshing II

This is a continuation of this question:

Parameter filter based on calculated field not refreshing - Question & Answer - Amazon Quick Sight Community

Which has been archived without warning because I was too busy to dig around in code for someone who was promising to resolve the issue. Although I don’t see how the code requested would have helped.

A tldr of the original question, which still has no answer is: Is there a way to auto-refresh data in a parameter based upon the results in a calculated field. The calculated field in question just puts the date of the nearest Monday in the past to the date of a sensor reading so that we can allow people to see data for a week commencing from a Monday.

The calculated field is defined thus:

formatDate(addDateTime(
    1, 
    'DD', 
    truncDate(
        'WK',
        ifelse(
            extract(
                'WD',
                date
            ) = 1, 
            addDateTime(
                -1, 
                'DD', 
                date
            ), 
            date
        )   
    )
), 'yyyy/MM/dd')

If you set a parameter to contain all unique values in the column that contains this calculated field then it will work when you first create it but every week (or few weeks) you have to select “Refresh” from the control settings menu (the three vertical dots in the upper right of the controls container) to add the weeks that have passed since.

I just want to know if there’s a way to automate the refresh.

TIA

Hey @lstablefordmatrix! Thanks for your question. Our US SA team is on Thanksgiving holiday until tomorrow. Wanted to make sure you know that we see your question and will make sure to get you a reply before EOD Monday US. Thanks! :slight_smile:

Kristin

@lstablefordmatrix ,

Is this a SPICE or direct query dataset ?

When I tested with direct query : The parameter values will not refresh automatically. You would have to refresh it manually in the control bar for the new weeks to populate.
For direct query datasets , the filter controls are refreshed every 24 hours ( Refreshing data in Amazon QuickSight - Amazon QuickSight ) .

For dataset which is based on SPICE . Once the ingestion process is complete, the parameter values should be showing the latest value. ( Tested and works )

Another question : if the calculated field built in your dataset is used for filtering in your analysis/dashboard . Why are you creating a parameter and then linking it to the field instead of just the using the field to filter ?

Kind regards,
Koushik

1 Like

Hello @lstablefordmatrix !

Was @Koushik_Muthanna 's post helpful in resolving this, and if so could you mark their post as a solution?

We have not heard from you in sometime but would still like to help you find a solution. If we do not hear from you in 3 days this post will be archived.

1 Like