Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Applicable88
Creator III
Creator III

How to change a "General" column to "Date" column properly

Hello,

Qliksense only recognized my timestamp as a "Date" automatically. But my "revenue_targets" cannot be linked to my timestamp because its  dates is related to  other issue. Only to "Revenue_month" I want to connect which is strangely set to "general".  I want to use something like a KPI Display with a  today() function, to show revenues target of the actual month. But since its not registered as a date columns its not going to work. 

I tried the [ ] symboll in the data manager. but it dont consist by default of the following  format to choose from: MM.YYYY

And when I put the format manually , the cells turns empty. 

timestamp    (as date)Revenue_MonthRevenue_Target
2020-04-09 14:47:1005.202028170000
2020-04-09 11:45:0205.202028170000
2020-04-09 14:47:1205.202028170000
2020-05-02 14:47:4406.202030000000
2020-06-09 14:47:1006.202030000000
2020-06-09 14:47:1006.202030000000
2020-05-09 14:47:1006.202030000000

 

I hope there is a nother solution to this. 

Stay safe!

Thanks in advance. 

2 Solutions

Accepted Solutions
jwjackso
Specialist III
Specialist III

Without changing the data, you could do something like this in the KPI:

sum({<Revenue_Month={"=$(=Date(Today(),'MM.YYYY'))"}>} Revenue_Target)

 

To change the data, I would look at the source to verify the Revenue_Month data.

View solution in original post

albertovarela
Partner - Specialist
Partner - Specialist

the 'MM.YYYY' is actually how your originally data looks like so I used it in the date#() to make the translation to a date.  The day 01 shows as I wrapped the expression with date() which in my locale settings is masked as MM/DD/YYYY

View solution in original post

4 Replies
albertovarela
Partner - Specialist
Partner - Specialist

I suggest you to use the date# function to evaluate the string as date

 

Capture.PNG

 

jwjackso
Specialist III
Specialist III

Without changing the data, you could do something like this in the KPI:

sum({<Revenue_Month={"=$(=Date(Today(),'MM.YYYY'))"}>} Revenue_Target)

 

To change the data, I would look at the source to verify the Revenue_Month data.

Applicable88
Creator III
Creator III
Author

Hi AlbertoV,

thanks for reply.

I think you might solve my problem because somehow its a "format" problem.

When I load "revenue_Month" in the script like

"Load

Date[Revenue_Month),'MM.YYYY')as Revenue_Month........

than suddenly all the vales gray out in that column. I dont know why.

With your approach I can generate Dates like this "01.05.2020".

But I'm surprised, since your format is like 'MM.YYYY ' , so why it still put an "01"  for every day there? Also in your example there are no Dates in MM.YYYY since its not DD.MM.YYYY ?

 
 
 

Hope you know why.

Thanks

 
 

 

albertovarela
Partner - Specialist
Partner - Specialist

the 'MM.YYYY' is actually how your originally data looks like so I used it in the date#() to make the translation to a date.  The day 01 shows as I wrapped the expression with date() which in my locale settings is masked as MM/DD/YYYY