If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

how to get number of business days in a month

Started by callmenagendra, 20 Jan 2015 07:14:01 AM

Previous topic - Next topic

callmenagendra

Hi All,

Am using below expression to calculate number of business days in a month.
if i use this data item as a row in a crosstab few columns are not displaying values.
Can anyone help me on this..

((cast(_days_between(?EndDate?,1900-01-01)/7,integer)*5)+if(_day_of_week(?EndDate?,1)>5) then (4) else (mod(_days_between(?EndDate?,1900-01-01),7))+1)
-
((cast(_days_between(?StartDate?,1900-01-01)/7,integer)*5)+if(_day_of_week(?StartDate?,1)>5) then (4) else (mod(_days_between(?StartDate?,1900-01-01),7))+1)
+
(if(_day_of_week(?StartDate?,1)<6) then (1) else (0))

Thanks in advance

johnGQ

try  to either create another query that wrap the query you used for the crosstab or put your computed field in the FM model, so crosstab see it only a number field.