Skip to main content
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

Hi Peyman,

use this :

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

date(subfield(text(class(myDate,$(varPeriod),' ')),' < ',2),'DD-MM-YYYY')

Regards,

Nilesh Gangurde

azimabadi
Creator III
Creator III
Author

Hi Nilsen,

Thank you for answer.

but where i have to enter the expersion? the "Label for Column/Row" in peresentation tab of  chart properties is disabled.

can you please explain where i need to write the expersion you offered?

SunilChauhan
Champion
Champion

try this

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

hope this helps

Sunil Chauhan
azimabadi
Creator III
Creator III
Author

thank you Sunil, but the second parameter is 'interval'. this doesn't help anymore.

we need to find a way to convert the displaying format of myDate that here is Integer not Date.

nilesh_gangurde
Partner - Specialist
Partner - Specialist

Hi Peyman,

On the Dimension tab u will see the "Add Calculated Dimension". Click on it and paste the above stuff there.

then add the expression For Example : sum(Sales ) in the expression tab.

Regards,

Nilesh Gangurde

azimabadi
Creator III
Creator III
Author

Thanks againe Nilesh,

i did so. my expersion is like :

sum( {<A ={"1"}>} v1 - v2 )

but in pivot table i get the error message "Error in calculated dimension." and i loss the clasification.

SunilChauhan
Champion
Champion

aggr(sum( {<A ={"1"}>} v1 - v2 ),idfield)

hope this helps

Sunil Chauhan
azimabadi
Creator III
Creator III
Author

what do you mean exactly Sunil?

SunilChauhan
Champion
Champion

aggregate expression by you key fields

so that it should show in your dimension

hope this helps

Sunil Chauhan