COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: bvk.cognoise on 26 Jun 2012 11:52:53 PM

Title: How to calculate number of days in month?
Post by: bvk.cognoise on 26 Jun 2012 11:52:53 PM
Hi  Mates,

I need some help to calculate number of days in selected month.

i am using cube as source,my requirement is whenever i select a month in prompt i want to see the number of working days in that particular month(except sunday,saturday).for rg:if i select a month in prompt how to calculate number of days in this month.

please help me in this.this is something very importent soloution which i need.



Thanks
bvk
Title: Re: How to calculate number of days in month?
Post by: CognosPaul on 27 Jun 2012 02:39:30 AM
Easiest way would be to create an attribute with that value. Does your month have days as descendants? You might be able to do something like count(1 within set filter(descendants(currentMember([Cube].[Dim].[Time Hier]),[DayLevel]),[Cube].[Dim].[Time Hier].[DayLevel].[Long Name] not in ('Saturday','Sunday'))