COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: gosoccer on 28 Aug 2014 02:31:33 PM

Title: CubeDataUpdatedOn ('[Cube]' in Report 10.1.2 (OLAP) DIM/Hierarchy
Post by: gosoccer on 28 Aug 2014 02:31:33 PM
Everyone,

I'm trying to use the following to get the last cube _days_between (date2timestamp (Today()), CubeDataUpdatedOn ('[Cube]'))
from a past article but I'm getting the following error after OP-ERR-0052       The expression operator 'CubeDataUpdatedOn' is unsupported.   after dropping this command to a Data Item so I can show it on the page of the report.
If I can be directed to the right document or approach to display this information or even just the CubeDataUpdatedOn ('[Cube]'
I will appreciate it very mcuh

:)Thank you in advance for your time.
Title: Re: CubeDataUpdatedOn ('[Cube]' in Report 10.1.2 (OLAP) DIM/Hierarchy
Post by: Lynn on 28 Aug 2014 02:51:11 PM
Try something like the below. Just drag in a dimension from the meta data view of your cube when you build the expression. No need for single quotes anywhere.


_days_between(
  date2timestamp ( Today() ) ,
  CubeDataUpdatedOn ( [YourCube].[YourDimension] )
)
Title: Re: CubeDataUpdatedOn ('[Cube]' in Report 10.1.2 (OLAP) DIM/Hierarchy
Post by: gosoccer on 29 Aug 2014 09:57:45 AM
Yes, works!!You are such a miracle worker. I'm hitting a crazy deadline and these answers sure makes my job easier.
:) 8)
Now, all I have to do is to show a begin and end date of 30 days before the last cube refresh date.

I know this might be too much to ask so if there isn't an easy way to have the begin and end date of the last 30 days calculated and populated, any hints will be appreciate it.

Thx in advance for your time.
Title: Re: CubeDataUpdatedOn ('[Cube]' in Report 10.1.2 (OLAP) DIM/Hierarchy
Post by: MFGF on 29 Aug 2014 10:19:01 AM
Quote from: gosoccer on 29 Aug 2014 09:57:45 AM
Yes, works!!You are such a miracle worker. I'm hitting a crazy deadline and these answers sure makes my job easier.
:) 8)
Now, all I have to do is to show a begin and end date of 30 days before the last cube refresh date.

I know this might be too much to ask so if there isn't an easy way to have the begin and end date of the last 30 days calculated and populated, any hints will be appreciate it.

Thx in advance for your time.

If you want the date 30 days before the cube update date, you can use the _add_days() function to get this

ie _add_days(CubeDataUpdatedOn([YourCube].[YourDimension] ), 30)

MF.
Title: Re: CubeDataUpdatedOn ('[Cube]' in Report 10.1.2 (OLAP) DIM/Hierarchy
Post by: gosoccer on 29 Aug 2014 10:53:59 AM
Ohhh! Wow, That works too. I changed it '-30' This is a good Friday after all.
Thank you so much Lynn and MF.  :) 8) ???
Title: Re: CubeDataUpdatedOn ('[Cube]' in Report 10.1.2 (OLAP) DIM/Hierarchy
Post by: MFGF on 29 Aug 2014 11:47:40 AM
Quote from: gosoccer on 29 Aug 2014 10:53:59 AM
Ohhh! Wow, That works too. I changed it '-30' This is a good Friday after all.
Thank you so much Lynn and MF.  :) 8) ???

Sorry! I meant -30 not 30 :)

MF.