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: 
azimabadi
Creator III
Creator III

Displaying date in "class" function label

Hi all

i have a pivot table and in it's Dimensions i have used a class function for classification as follow:

class ( myDate , varPeriod , 'Date' , -1 )

myDate is a "Date" type. In labels of each class shown in pivot table i have something like this :

40915 <= Date < 40919          40919 <= Date < 40923     ...

i need to customize labels. for example something like :

07.01.2012                              11.01.2012

i need to mention that ( 07.01.2012 ~ 40915 ) and ( 11.01.2012 ~ 40919 ).

at least i need one of the following forms:

07.01.2012 <= Date                 11.01.2012 <= Date

or

07.01.2012 <= Date  < 11.01.2012               11.01.2012 <= Date < 15.01.2012

how can i do that?

thank you so much.

14 Replies
nilesh_gangurde
Partner - Specialist
Partner - Specialist

use this :

Date(subfield(text(class(num(myDate),$(varPeriod),' ')),'<=',1),'DD-MM-YYYY') & ' To ' & date(subfield(text(class(num(myDate),$(varPeriod),' ')),' < ',2),'DD-MM-YYYY')

U are getting that error msg because of the equel Sign. Please remove the "=" equal sign and try with the above expression.

To test the class function is working or no put tha basic expression(in expression tab) first and then go for deep analysis.

Regards ,

Nilesh Gangurde

azimabadi
Creator III
Creator III
Author

this was useful, but the classification created by this expression is not waht is expected and resulted classification and calculation are false.

there is not any way we change the date format in original class function?

nilesh_gangurde
Partner - Specialist
Partner - Specialist

The above expresssion changes the date format of Original class function only.

Can you attach the qvw file.

So i can help you.

Regards,

Nilesh Gangurde

azimabadi
Creator III
Creator III
Author

This is customer data and i am not allowed to share it.

but i make a qwv with sample data and post it in a few minutes.

azimabadi
Creator III
Creator III
Author

Here is my sample. I have explained the expected labels in text objects below each column.

thank you so much for help againe