Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Divyanshu
Contributor II
Contributor II

Dynamic X-axis based on filter selections.

Hi all,

I want my line chart's X-axis to change dynamically on the basis of a 'Time-Period' filter selection. How to achieve in Qlik -> the dynamic chart where the x-axis would update based on dropdown selection (if current qtr, then x-axis would be q1, q2, etc. and if YTD, it would be 2021, 2022 .. basically all years).

1 Solution

Accepted Solutions
Or
MVP
MVP

If(SelectionField = 'current qtr', QuarterField, YearField) in a calculated dimension, assuming these are the only two options. If there's more options, add if() statements. If you don't already have a SelectionField, you can create one using

LOAD * INLINE [

SelectionField

current qtr

YTD ];

View solution in original post

2 Replies
Or
MVP
MVP

If(SelectionField = 'current qtr', QuarterField, YearField) in a calculated dimension, assuming these are the only two options. If there's more options, add if() statements. If you don't already have a SelectionField, you can create one using

LOAD * INLINE [

SelectionField

current qtr

YTD ];

Divyanshu
Contributor II
Contributor II
Author

Thanks for the reply. It works perfectly now.