Regarding relation of filters and visuals

There is one line graph and one bar chart. Year filter is applied to line graph… So when I selected year in filter… I need selected year data in line graph and Previous all years data in the bar graph.

1 Like

Hello @Charitha.krishna !

To clarify your question, is the problem that your line graph filter is also affecting your bar chart and you only want the filter to affect your line graph?

If so you will want to ensure that the year choice filter you have created is only applied to your line graph visualization and not the entire analyses.

2 Likes

Hi,

this may help you

regards
Naveed Ali

1 Like

Hello @Charitha.krishna - Thank you for posting your query. If I understand your question, then you would like to filter your visuals via a user selection in such a way that the Line Graph filters the data by the selected year whereas the Bar Chart shows the data of all previous years. This can be achieved using parameters.

Step 1 : Create parameter (paramYear) of integer datatype and assign it a default value e.g. 2023

Step 2 : Create a Calculated Field (Year Difference) to calculate the difference between the actual year column and the user input i.e. parameter.

image

Step 3 : Select the Line Chart and Create Filter with the following setting i.e. filter the data where the “Year Difference” column value will be 0

Step 4 : Select the Bar Chart and Create Filter with the following setting i.e. filter the data where the “Year Difference” column value is less than 0

Step 5 : Add the Parameter Control into the Sheet and play around with it to see the implementation.

In our Sample Dataset we have 3 years data 2021, 2022 and 2023. Case 1 is where the selected year is 2023 and Case 2 is where the selected year is 2022. See the Snapshots below. Hope this helps!

Case 1 : Selected Year => 2023

Case 2 : Selected Year => 2022

Did my suggestion help you in resolving your query? If yes, would request you to mark the post as “Solution”. This will help the community to find guidance and answers to similar question. Thank you!