Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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.