Using Session Tags to Determine the Data Shown

Hello,

I have a question regarding session tags and associated use in dashboards. We have a complex dashboard we use that has several tabs. Many of these tabs have different datasets. We currently pass three session tags as ‘parameters’ through RLS to help determine what users see.

Now, the issue. One of the datasets we use does not contain all 3 tags, as one of them (the month tag) was irrelevant. We were using a filter on that tab to allow the user to choose their own date range. Now, we want to lock that down and prevent them from seeing anything past the last day of the month that is passed as a session tag. Outside of creating a new tag (though unsure of how that would look, since they could click on any month to view), is there a way to view the session tag passed when the dashboard is accessed, and somehow use that as a filter in a calculated field to only present the data from before the end of the month chosen? i.e. they choose July, we want them to see all dates leading up to 7/31)

Thank you for taking time to consider this question.

Hello @bi_curantis , welcome to the QuickSight community!

You could make this work by passing the month value as a parameter. You could keep using your date filter but include a secondary filter, that wouldn’t be accessible to the end user, that would be based on this calc:

ifelse(truncDate("MM", ${DateParam}) >= {Date Field}, 1, 0)

Set the filter so that the filter can only equal 1 and it should stop the user from selecting higher dates.

3 Likes

Thank you, @duncan for your reply and for the welcome!

We have to use a default value in the parameter before we are able to use it in a calculated field - wouldn’t this cause an issue? Or does that default value get overridden when the dashboard is executed? I tried testing this in a similar situation (just trying to get it to print the parameter being passed) but it always only showed the default value.

Found a solution:

Pass the parameter in the embedded URL. (Using parameters in a URL - Amazon QuickSight) Create a parameter with the same name as the passed parameter, and use that in a filter to show records before (including the date) the passed parameter.

One thing noticed: this will only work in the embedded dashboard, as the date parameter requires a default value. This will always show every record when viewing the Analysis or the Dashboard from QS itself, so it may lead to issues in troubleshooting. For example, I have a multi-tab dashboard that requires different filter configurations. Using one passed parameter for the end of the month will limit what I see on individual tabs, but using the same configuration will not work with others. If I require that each tab be filtered differently, we need to create new parameters in the embedded URL and pass those.

2 Likes