Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
prasad333
Contributor III
Contributor III

Can I show Months and Years together on the same chart ?

Hi All,

I have shared an excel file, where I have shared the screenshot of the type of chart I want to show and the sample data to build it. Kindly help me with it.

Thanks,

Kharansu

Labels (1)
1 Reply
ArnadoSandoval
Specialist II
Specialist II

Hi @prasad333 

Yes, it is possible by following the logic described by the solution in this topic: Dynamically choosing dimensions for graphs / tables ; the author of this solution selects the required dimension from a table listing the name of the columns on the table shown in the bar-chart.

Extending this logic to your particular problem, you need to "add" 3 columns, like [2019], [2020] and [2021] in your load script, and provide a Target_Years table with the values, 2019, 2020 and 2021 (which correspond with the 3 new columns).

The magic is completed in your bar-chart by using the following expression for its dimension field:

=$(=MinString(Target_Year))

I am attaching a demo solution for your problem, the only issue I could not address was sorting the year data chronologically, it refuse to include the expanded year in the sequence of years, as it is always appearing at the end.

hth

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.