Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qliksense Chart with date

Hi, 

i need help!

I need to create a chart where the dimention on the X-Asis is Month-Year (jan-2013, feb-2013 ...)

I really don't know how to do this?

any idea?

thanks a lot

F.

1 Solution

Accepted Solutions
robert99
Specialist III
Specialist III

Try this

Date ( Makedate(  num(left ([starting date],4)), num(MID ([starting date],5,2)), 1), 'DD-MM-YYYY') as MonthYear,

and then format as MonthName or

monthname( Date ( Makedate(  num(left ([starting date],4)), num(MID ([starting date],5,2)), 1), 'DD-MM-YYYY')) as MonthYear,

View solution in original post

17 Replies
robert99
Specialist III
Specialist III

Do you mean other than putting in an expression in each column

like sum(if(Month-Year = 'Jan-2013',Revenue) ETC

OR SUM({<Month-Year ={Jan-2013} >}Revenue)

JonnyPoole
Employee
Employee

If you go to the load editor,  you can add a new line into the 'LOAD' and format a new field based on the Date field  to format as you wish using something like this:

Load

         

          Date(  [YourDateField],'MMM-YYYY') as [Month-Year]

    

from  <source>

...then use [Month-Year] as a dimension in your chart.

r_wroblewski
Partner - Creator III
Partner - Creator III

Hi

Can you share with us what kind of Date format exist in your application?

(year, month and day separeted or a timestamp)

The easiest way is to create a new field based on your available fields inside the script but to tell you the correct one we need to know the current date fields.

best regards,

Ronny

Not applicable
Author

Hi guys, thanks a lot for your answers,

the date field is in the format: "20141007", unfortunately is not seperated.

I tried to crop the day and keep only month and year " 201410" and then make the date with not success -_-

in the Y aaxis there's an order count expression.

I

robert99
Specialist III
Specialist III

Try this

Date ( Makedate(  num(left ([starting date],4)), num(MID ([starting date],5,2)), 1), 'DD-MM-YYYY') as MonthYear,

and then format as MonthName or

monthname( Date ( Makedate(  num(left ([starting date],4)), num(MID ([starting date],5,2)), 1), 'DD-MM-YYYY')) as MonthYear,

r_wroblewski
Partner - Creator III
Partner - Creator III

Hi Francesco

you can create an additional YearMonth field in your script.

Use

date(monthstart(date(date#(YourDateFieldName, 'YYYYMMDD'), 'YYYY-MM-DD')), 'YYYY-MM')asYearMonth

in same part where your Datefield is and after reload you can use it for your graphs.

Best regards,

Ronny

Not applicable
Author

Hi Ronny,

I used your script but I need the data in the MM-YYYY format and if i change it in the script the result are always

00-Jan

00-Feb and so on...

best regards and thanks a lot for your time

F.

Not applicable
Author

Hi RJ,

I used your solution and it works for the creation of the measure, but whan i use it in the graph it makes a sum of the values without splitting the results for each month

thanks a lot

BR

F.

robert99
Specialist III
Specialist III

what graph (chart)are you using. And what is your dimension (monthyear I assume) and expression