Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to set dimensions for x-axis in chart

I have a table which represents the quantities of sold product for each month in different years from 2010 up to 2014

TABLE.png

I would like to have in QV the same chart I have with excel

EXCEL CHART.png

but what I can have is like the below example

QV CHART.png

where there is not a single line but it is referred to each month.

My set is:

dimensions:

Year

Month

expression:

=SUM({<My_year=,My_month=>} Quantità)

by using the set analysis.

How can I have something like excel chart?

Thanks

Massimo

1 Solution

Accepted Solutions
oknotsen
Master III
Master III

Month(Mese) as My_month,
Date(MonthStart (Mese), 'MMM-YYYY') as MonthYear,

Year(Mese) as My_year,

May you live in interesting times!

View solution in original post

8 Replies
oknotsen
Master III
Master III

I would suggest to create a YearMonth field in the script and use that in your chart instead.

Add this to your MasterCalendar (or any table you are using the date from):

Date(MonthStart (DateField), 'MMM-YYYY') as MonthYear,

Would that work for you?

May you live in interesting times!
Not applicable
Author

Dear Onno,

In my script I set the below:

LOAD

Month(Mese) as My_month,
Year(Mese) as My_year,

since Mese is stated as JAN-2014, FEB-2014, etc.

Where and how I can use your suggest?

I apologise for that but I am not an expert.

Thanks in advance

Anonymous
Not applicable
Author

use Month(Mese) & '-' & Year(Mese) as MonthYear in your script.

Not applicable
Author

Hi,

Can you please try loading an extra column as

date#(MESE&'-'ANNO ,'MMM-YYYY') AS [MON-YYYY]

and using that column in the chart.

oknotsen
Master III
Master III

Month(Mese) as My_month,
Date(MonthStart (Mese), 'MMM-YYYY') as MonthYear,

Year(Mese) as My_year,

May you live in interesting times!
oknotsen
Master III
Master III

What Zeeshanuddin suggests would be a calculated dimension.

Calculated dimensions are bad for performance, so if you have the choice to add the MonthYear field to your script and use that instead, it would be better for performance.

May you live in interesting times!
oknotsen
Master III
Master III

That would result in month numbers instead of month abbreviations (the 3 letters).

So, Massimo, take what you like .

May you live in interesting times!
Not applicable
Author

Thanks Onno,

it works perfectly.

Massimo