COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: Deep750 on 08 Mar 2019 08:52:59 AM

Title: running average per day, with a twist
Post by: Deep750 on 08 Mar 2019 08:52:59 AM
Hi,
I have a report, with DMR-package as a source.
I'm supposed to make a running average but only display the running average-value for saturdays in the report. Any suggestions on how to do this?

Example
I have this table, where the first row is the measure, the second is the rolling average. And I need to only display the rolling average which are bold, which are saturdays.




Time201901012019010220190103201901042019010520190106   20190107   20190108   20190109   20190110   20190111   20190112
Measure164 330163 117162 798164 253165 877165 647164 967165 575165 798166 776166 849167 798
Running average164 330163 723,5163 415163 624,5164 075164 337   164 427164 570,5164 706,9164 913,8165 089,7165 315,4

I have made a time series with only saturdays
generate(
               [Dimensional view - ATP7].[Time].[By Calendar Week].[Week],
               item(
                              descendants(
                                             currentMember([Dimensional view - ATP7].[Time].[By Calendar Week]),
                                             [Dimensional view - ATP7].[Time].[By Calendar Week].[Day]
                              ),
                              5)
)

But how to make the running average, based in each day, but only display the saturdays?
This doesn't display any data, suspect it to be DMR-issue. But even if it had worked, i assume the rolling average would have been for the saturdays, not each day ?
average(
         [Dimensional view - ATP7].[ATP7].[IsAvailable for Salesorg]
         within set
         periodsToDate(
                         [Dimensional view - ATP7].[Time].[By Fiscal Year/Period 4-4-5].[Year],
                         currentMember(
                                         [Dimensional view - ATP7].[Time].[By Fiscal Year/Period 4-4-5]
                         )
         )
)


Would appreciate any input on how to solve this. If it is easier using a relational source, please give examples on how to do that as well.

/Deep
Title: Re: running average per day, with a twist
Post by: CognosPaul on 10 Mar 2019 12:17:53 AM
Can you add a day of week property to the day level?
Title: Re: running average per day, with a twist
Post by: Deep750 on 11 Mar 2019 02:38:52 AM
Hi Paul,
Yes, I can add day of week property. Any suggestions?
Title: Re: running average per day, with a twist
Post by: CognosPaul on 11 Mar 2019 11:21:56 AM
add the property to the node (in the properties list there's a row called properties), and use a render variable on the text item inside the cell.