Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Object Calendar Julian date in pivot table


Hi all,

Probably it is an easy question but I tried with hundred expressions without solve the problem.

I create  an expression (pivot table) with format date "YYYYMMDD" the pivot works pefectly,

Instead if I use the Julian date the expression doesn't work.

=sum({<JulianDate = {'>=$(vDataJFrom)<=$(vDataJTo)'}>} [Day]

Hire attached an example

Anyone knows  the solution ?

Many Thanks

Claudio

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

Your Julian Date is not recognized as a date.

Julian.png

You can see that on the fact that it is left-aligned. The reason is that you in the script have a date like '41640' and you try to interpret this using Date#(DataGen, 'YYYYMMDD'). You should not interpret it - it already has the right numeric value. Instead you should format it using Date() with a format that is to be used in the Set Analysis.

Or, skip the format and use numeric values all through. (also in the Set Analysis.)

HIC

View solution in original post

4 Replies
Not applicable
Author

Claudio,

I cannot open your qvw because I have the Personal Edition.

So, I do not know if you tried that solution or not. I would use the date function:

=sum({<JulianDate = {'>=$(=date(vDataJFrom, 'YYYYMMDD'))<=$(=date(vDataJTo, 'YYYYMMDD'))'}>} [Day]

Hope it works

Fabrice

hic
Former Employee
Former Employee

Your Julian Date is not recognized as a date.

Julian.png

You can see that on the fact that it is left-aligned. The reason is that you in the script have a date like '41640' and you try to interpret this using Date#(DataGen, 'YYYYMMDD'). You should not interpret it - it already has the right numeric value. Instead you should format it using Date() with a format that is to be used in the Set Analysis.

Or, skip the format and use numeric values all through. (also in the Set Analysis.)

HIC

Not applicable
Author

Thank you   Henric,

I have done a stupid mistake...

I had copy the line before and i had not change the function date to num

Many Tks

Claudio


aveeeeeee7en
Specialist III
Specialist III

Dear Claudio

Henric Sir is Absolutely right.

You have an Auto generated Dates which is in Number format

You have created variables i.e. vDataAl & vDataDal . Both of them are is Number Format.

I have seen you have used Date# function which is of no need.

Use your original Autogenerated field which is Number format already and see the result.

Also see the Attachment where i have used new code.