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

Help with conversion from Cube to DMR Expression

Started by tarunkrdas2013, 10 Aug 2015 01:48:47 PM

Previous topic - Next topic

tarunkrdas2013

Hi Gurus,
I have a requirement where in we are converting Cube with DMR ,so we in Report studio have a expression where from cube package we have expression as :-

   union(
   union(
   union(
   member(aggregate(currentMeasure within set (periodsToDate ([C_Department_Flash].[FISCAL CALENDAR].[FISCAL CALENDAR].[FISCAL DATE] , [C_Department_Flash].[FISCAL CALENDAR].[FISCAL CALENDAR].[FISCAL DATE]->:[PC].[@MEMBER].#sb(timestampmask(prompt('p_Date','Date', _add_days ($current_timestamp,-1),'','','T00:00:00Z'),'yyyymmdd'))#))),'DAILY','DAILY',[C_Department_Flash].[FISCAL CALENDAR].[FISCAL CALENDAR])
   ,
   member(aggregate(currentMeasure within set (periodsToDate ([C_Department_Flash].[FISCAL CALENDAR].[FISCAL CALENDAR].[FISCAL WEEK] , [C_Department_Flash].[FISCAL CALENDAR].[FISCAL CALENDAR].[FISCAL DATE]->:[PC].[@MEMBER].#sb(timestampmask(prompt('p_Date','Date', _add_days ($current_timestamp,-1),'','','T00:00:00Z'),'yyyymmdd'))#))),'WTD','WTD',[C_Department_Flash].[FISCAL CALENDAR].[FISCAL CALENDAR])
   )
   ,
   member(aggregate(currentMeasure within set (periodsToDate ([C_Department_Flash].[FISCAL CALENDAR].[FISCAL CALENDAR].[FISCAL PERIOD] , [C_Department_Flash].[FISCAL CALENDAR].[FISCAL CALENDAR].[FISCAL DATE]->:[PC].[@MEMBER].#sb(timestampmask(prompt('p_Date','Date', _add_days ($current_timestamp,-1),'','','T00:00:00Z'),'yyyymmdd'))#))),'PTD','PTD',[C_Department_Flash].[FISCAL CALENDAR].[FISCAL CALENDAR])
   )
   ,
   member(aggregate(currentMeasure within set (periodsToDate ([C_Department_Flash].[FISCAL CALENDAR].[FISCAL CALENDAR].[FISCAL YEAR] , [C_Department_Flash].[FISCAL CALENDAR].[FISCAL CALENDAR].[FISCAL DATE]->:[PC].[@MEMBER].#sb(timestampmask(prompt('p_Date','Date', _add_days ($current_timestamp,-1),'','','T00:00:00Z'),'yyyymmdd'))#))),'YTD','YTD',[C_Department_Flash].[FISCAL CALENDAR].[FISCAL CALENDAR])
   )



but try to make same report using  in DMR package  when i change the above string i get Parsing error as we doesn't have [C_Department_Flash].[FISCAL CALENDAR].[FISCAL CALENDAR].[FISCAL YEAR] , [C_Department_Flash].[FISCAL CALENDAR].[FISCAL CALENDAR].[FISCAL DATE]->:[PC].[@MEMBER] like above rather it has [DMR].[Fiscal Calendar].[Fiscal Calendar].[Fiscal Date]->[all].[2015].[1].[1].[2014-09-01]

can anyone suggest how to get the above expression in cube to work in  DMR.

Past 2 days searching answer to the above problem

   

tarunkrdas2013


karthik.kadambi

Have you tried starting with just periodsToDate function and see if it throws up parsing error?

tarunkrdas2013

Thanks karthik,

This got solved by

union(
       union(
       union(
       member(aggregate(currentMeasure within set (periodsToDate ([DMR].[Fiscal Calendar].[Fiscal Calendar].[Fiscal Date],[DMR].[Fiscal Calendar].[Fiscal Calendar].[Fiscal Date]->[all].[@MEMBER].#sb(timestampmask(prompt('p_Date','Date', _add_days ($current_timestamp,-1),'','','T00:00:00Z'),'yyyymmdd'))#))),'DAILY','DAILY',[DMR].[Fiscal Calendar].[Fiscal Calendar])
       ,
       member(aggregate(currentMeasure within set (periodsToDate ([DMR].[Fiscal Calendar].[Fiscal Calendar].[Fiscal Week],[DMR].[Fiscal Calendar].[Fiscal Calendar].[Fiscal Date]->[all].[@MEMBER].#sb(timestampmask(prompt('p_Date','Date', _add_days ($current_timestamp,-1),'','','T00:00:00Z'),'yyyymmdd'))#))),'WTD','WTD',[DMR].[Fiscal Calendar].[Fiscal Calendar])
       )
       ,
       member(aggregate(currentMeasure within set (periodsToDate ([DMR].[Fiscal Calendar].[Fiscal Calendar].[Fiscal Period],[DMR].[Fiscal Calendar].[Fiscal Calendar].[Fiscal Date]->[all].[@MEMBER].#sb(timestampmask(prompt('p_Date','Date', _add_days ($current_timestamp,-1),'','','T00:00:00Z'),'yyyymmdd'))#))),'PTD','PTD',[DMR].[Fiscal Calendar].[Fiscal Calendar])
       )
       ,
       member(aggregate(currentMeasure within set (periodsToDate ([DMR].[Fiscal Calendar].[Fiscal Calendar].[Fiscal Year],[DMR].[Fiscal Calendar].[Fiscal Calendar].[Fiscal Date]->[all].[@MEMBER].#sb(timestampmask(prompt('p_Date','Date', _add_days ($current_timestamp,-1),'','','T00:00:00Z'),'yyyymmdd'))#))),'YTD','YTD',[DMR].[Fiscal Calendar].[Fiscal Calendar])
       )