<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Macro functions and prompts in Cognos BI reports</title>
	<atom:link href="http://ykud.com/blog/cognos/macro-functions-and-prompts-in-cognos-bi-reports/feed" rel="self" type="application/rss+xml" />
	<link>http://ykud.com/blog/cognos/macro-functions-and-prompts-in-cognos-bi-reports</link>
	<description></description>
	<lastBuildDate>Fri, 18 May 2012 08:38:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: ykud</title>
		<link>http://ykud.com/blog/cognos/macro-functions-and-prompts-in-cognos-bi-reports/comment-page-1#comment-25002</link>
		<dc:creator>ykud</dc:creator>
		<pubDate>Tue, 18 May 2010 12:44:53 +0000</pubDate>
		<guid isPermaLink="false">http://ykud.com/blog/?p=229#comment-25002</guid>
		<description>Dimitris, 
I&#039;d repeat my suggestion: try CurrentPeriod category in Transformer cube you&#039;re using as a source to get current date and year. It&#039;d be easier than any javascript i can think of. 

Sometimes, when prompt values are not reprompted\passed, you can add a javascript refresh command and therefore reload the report.</description>
		<content:encoded><![CDATA[<p>Dimitris,<br />
I&#8217;d repeat my suggestion: try CurrentPeriod category in Transformer cube you&#8217;re using as a source to get current date and year. It&#8217;d be easier than any javascript i can think of. </p>
<p>Sometimes, when prompt values are not reprompted\passed, you can add a javascript refresh command and therefore reload the report.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dimitris</title>
		<link>http://ykud.com/blog/cognos/macro-functions-and-prompts-in-cognos-bi-reports/comment-page-1#comment-24869</link>
		<dc:creator>Dimitris</dc:creator>
		<pubDate>Mon, 10 May 2010 10:46:03 +0000</pubDate>
		<guid isPermaLink="false">http://ykud.com/blog/?p=229#comment-24869</guid>
		<description>Hello,tnks for your replies.

I use as a package for my reports ,  a cognos cube from transformer.

My aim is to have a single page with 2 calendars where when i select a period(Start_from , End_to),my 2 measures in my crosstab to beinfluenced as following,
the first one with the selected period choosen
and
the second one with the same period but from the last year.
I do not use filters because are not recommended for cubes.
So , i make a data item for my first measure,
/////////////////
aggregate(
CurrentMeasure
within set
(
intersect(lastPeriods(-370;#’[Analysis Sales].[Time].[Time].[Day]-&gt;:[PC].[@MEMBER].[&#039;+substitute(&#039;-&#039;;&#039;&#039;;substitute(&#039;-&#039;;&#039;&#039;;
prompt(&#039;Date_From&#039;,&#039;token&#039;;&#039;XXXXXXXXXX&#039;)))+&#039;]‘#);
lastPeriods(370;#’[Analysis Sales].[Time].[Time].[Day]-&gt;:[PC].[@MEMBER].[&#039;+substitute(&#039;-&#039;;&#039;&#039;;substitute(&#039;-&#039;;&#039;&#039;;prompt(&#039;Date_To&#039;,&#039;token&#039;;
&#039;XXXXXXXXX&#039;
)))+&#039;]‘#) )))
////////////////////////////////
In this way i manage to aggregate my measure for the desired period.
My 2 questions come here.
I&#039;ve read that in order not to appear the 2 calendars as a prompt page(only in my main one),i have to make my data item optionally.This can be done with macro by using a 3 parameter?right?Right,(with filters,we just set it as an optionally one).With Javascript i managed to set the calendar values to default values,1 from current year and current date.But unfortuantely these 2 parameters do not pass in my crosstab.How can i manage this?Is there any other way,(without javascript),to pass from macros these 2 defaults values for my crosstab?

My second measure has the same logic.I find it with using the parallel period to the previous one.Ok.But still have the 2 questions above.

How to pass in macros default values,1 of year and current date
or
How can i set through javascript my defaults one but there are still passed into crosstab.

Tnks again!</description>
		<content:encoded><![CDATA[<p>Hello,tnks for your replies.</p>
<p>I use as a package for my reports ,  a cognos cube from transformer.</p>
<p>My aim is to have a single page with 2 calendars where when i select a period(Start_from , End_to),my 2 measures in my crosstab to beinfluenced as following,<br />
the first one with the selected period choosen<br />
and<br />
the second one with the same period but from the last year.<br />
I do not use filters because are not recommended for cubes.<br />
So , i make a data item for my first measure,<br />
/////////////////<br />
aggregate(<br />
CurrentMeasure<br />
within set<br />
(<br />
intersect(lastPeriods(-370;#’[Analysis Sales].[Time].[Time].[Day]-&gt;:[PC].[@MEMBER].['+substitute('-';'';substitute('-';'';<br />
prompt('Date_From','token';'XXXXXXXXXX')))+']‘#);<br />
lastPeriods(370;#’[Analysis Sales].[Time].[Time].[Day]-&gt;:[PC].[@MEMBER].['+substitute('-';'';substitute('-';'';prompt('Date_To','token';<br />
'XXXXXXXXX'<br />
)))+']‘#) )))<br />
////////////////////////////////<br />
In this way i manage to aggregate my measure for the desired period.<br />
My 2 questions come here.<br />
I&#8217;ve read that in order not to appear the 2 calendars as a prompt page(only in my main one),i have to make my data item optionally.This can be done with macro by using a 3 parameter?right?Right,(with filters,we just set it as an optionally one).With Javascript i managed to set the calendar values to default values,1 from current year and current date.But unfortuantely these 2 parameters do not pass in my crosstab.How can i manage this?Is there any other way,(without javascript),to pass from macros these 2 defaults values for my crosstab?</p>
<p>My second measure has the same logic.I find it with using the parallel period to the previous one.Ok.But still have the 2 questions above.</p>
<p>How to pass in macros default values,1 of year and current date<br />
or<br />
How can i set through javascript my defaults one but there are still passed into crosstab.</p>
<p>Tnks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ykud</title>
		<link>http://ykud.com/blog/cognos/macro-functions-and-prompts-in-cognos-bi-reports/comment-page-1#comment-24807</link>
		<dc:creator>ykud</dc:creator>
		<pubDate>Wed, 05 May 2010 16:53:55 +0000</pubDate>
		<guid isPermaLink="false">http://ykud.com/blog/?p=229#comment-24807</guid>
		<description>Hello again Dimitris. 
Considering your questions:
&quot;1.i want my calendar not to be shown as a promp page(so i have to make it optional) how???&quot;

If you don&#039;t want anything to be shown on a page -- just delete it ) Your filters are tied to a variable, which will remain in any case. 
And then you can add a filter on a report page and connect it to this variable, if you need. 

If I understand you correctly, you want a report with measures aggregated from start of the year to the current day (when report is run). If this is the single goal, you can easily do this via &quot;YTD&quot; category in Transformer. By adding a relative time element in time dimension, you can aggregate all dates from year start to current date set in transformer. And your measures will be as simple as tuple(CurrentMeasure,YTD).

But if you&#039;ll need more flexible time reports with current period prompts -- you&#039;ll have to do it in Report Studio. 

Sorry for delay in answering,
Yuri</description>
		<content:encoded><![CDATA[<p>Hello again Dimitris.<br />
Considering your questions:<br />
&#8220;1.i want my calendar not to be shown as a promp page(so i have to make it optional) how???&#8221;</p>
<p>If you don&#8217;t want anything to be shown on a page &#8212; just delete it ) Your filters are tied to a variable, which will remain in any case.<br />
And then you can add a filter on a report page and connect it to this variable, if you need. </p>
<p>If I understand you correctly, you want a report with measures aggregated from start of the year to the current day (when report is run). If this is the single goal, you can easily do this via &#8220;YTD&#8221; category in Transformer. By adding a relative time element in time dimension, you can aggregate all dates from year start to current date set in transformer. And your measures will be as simple as tuple(CurrentMeasure,YTD).</p>
<p>But if you&#8217;ll need more flexible time reports with current period prompts &#8212; you&#8217;ll have to do it in Report Studio. </p>
<p>Sorry for delay in answering,<br />
Yuri</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dimitris</title>
		<link>http://ykud.com/blog/cognos/macro-functions-and-prompts-in-cognos-bi-reports/comment-page-1#comment-24739</link>
		<dc:creator>Dimitris</dc:creator>
		<pubDate>Mon, 03 May 2010 16:58:18 +0000</pubDate>
		<guid isPermaLink="false">http://ykud.com/blog/?p=229#comment-24739</guid>
		<description>Are you using a dimensional or Dimensionally Modeled Relational model in framework manager? 
///Cognos Cube from transformer.

f you are using DMR, you can use ParallelPeriod function that will provide you the same period, year ago values.
///ok i find it...

1.i want my calendar not to be shown as a promp page(so i have to make it optional) how???
2.i set some javascript in order to set the calendar to my appropriates dates,but these values not pass in reports,just in calendars...any idea??

i use this code for all my measures...

aggregate(


CurrentMeasure

within set
(intersect(lastPeriods(-370;#&#039;[Analysis Sales].[Time].[Time].[Day]-&gt;:[PC].[@MEMBER].[&#039;+substitute(&#039;-&#039;;&#039;&#039;;substitute(&#039;-&#039;;&#039;&#039;;prompt(&#039;Date_From&#039;,&#039;token&#039;;&#039;XXXXXXXXXX&#039;)))+&#039;]&#039;#);
               lastPeriods(370;#&#039;[Analysis Sales].[Time].[Time].[Day]-&gt;:[PC].[@MEMBER].[&#039;+substitute(&#039;-&#039;;&#039;&#039;;substitute(&#039;-&#039;;&#039;&#039;;prompt(&#039;Date_To&#039;,&#039;token&#039;;
&#039;XXXXXXXXX&#039;
 )))+&#039;]&#039;#) )))

what to put in the 3rd option???where is the default value???(=XXXXXXXX).I want my start date to be 1 of current year and ends to current date..


tnks in advance...</description>
		<content:encoded><![CDATA[<p>Are you using a dimensional or Dimensionally Modeled Relational model in framework manager?<br />
///Cognos Cube from transformer.</p>
<p>f you are using DMR, you can use ParallelPeriod function that will provide you the same period, year ago values.<br />
///ok i find it&#8230;</p>
<p>1.i want my calendar not to be shown as a promp page(so i have to make it optional) how???<br />
2.i set some javascript in order to set the calendar to my appropriates dates,but these values not pass in reports,just in calendars&#8230;any idea??</p>
<p>i use this code for all my measures&#8230;</p>
<p>aggregate(</p>
<p>CurrentMeasure</p>
<p>within set<br />
(intersect(lastPeriods(-370;#&#8217;[Analysis Sales].[Time].[Time].[Day]-&gt;:[PC].[@MEMBER].['+substitute('-';'';substitute('-';'';prompt('Date_From','token';'XXXXXXXXXX')))+']&#8216;#);<br />
               lastPeriods(370;#&#8217;[Analysis Sales].[Time].[Time].[Day]-&gt;:[PC].[@MEMBER].['+substitute('-';'';substitute('-';'';prompt('Date_To','token';<br />
'XXXXXXXXX'<br />
 )))+']&#8216;#) )))</p>
<p>what to put in the 3rd option???where is the default value???(=XXXXXXXX).I want my start date to be 1 of current year and ends to current date..</p>
<p>tnks in advance&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ykud</title>
		<link>http://ykud.com/blog/cognos/macro-functions-and-prompts-in-cognos-bi-reports/comment-page-1#comment-24126</link>
		<dc:creator>ykud</dc:creator>
		<pubDate>Tue, 13 Apr 2010 05:42:49 +0000</pubDate>
		<guid isPermaLink="false">http://ykud.com/blog/?p=229#comment-24126</guid>
		<description>Hi, Dimitris. 
A couple of questions, if I may:
Are you using a dimensional or Dimensionally Modeled Relational model in framework manager? If you are using DMR, you can use ParallelPeriod function that will provide you the same period, year ago values. 
Are you using macro function as filter or as a way to get a Data Item with selected date? If you use macros to create a Data Item, you can wrap up rather crude macro logic with cases to substitute year value with previous one.

Yuri</description>
		<content:encoded><![CDATA[<p>Hi, Dimitris.<br />
A couple of questions, if I may:<br />
Are you using a dimensional or Dimensionally Modeled Relational model in framework manager? If you are using DMR, you can use ParallelPeriod function that will provide you the same period, year ago values.<br />
Are you using macro function as filter or as a way to get a Data Item with selected date? If you use macros to create a Data Item, you can wrap up rather crude macro logic with cases to substitute year value with previous one.</p>
<p>Yuri</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dimitris</title>
		<link>http://ykud.com/blog/cognos/macro-functions-and-prompts-in-cognos-bi-reports/comment-page-1#comment-24122</link>
		<dc:creator>Dimitris</dc:creator>
		<pubDate>Mon, 12 Apr 2010 22:16:50 +0000</pubDate>
		<guid isPermaLink="false">http://ykud.com/blog/?p=229#comment-24122</guid>
		<description>hi....
nice WORK!!!
one question...i manage to choose a date period from 2 calendars using substitute...and so on...But unfortuantely this influence all my report.
My question is,
if i have the same measure and i want to have values from 2 different periods in the same crosstab,one period from the calendar one...and one the same but for the year ago...

Any help??

tnks one more time!</description>
		<content:encoded><![CDATA[<p>hi&#8230;.<br />
nice WORK!!!<br />
one question&#8230;i manage to choose a date period from 2 calendars using substitute&#8230;and so on&#8230;But unfortuantely this influence all my report.<br />
My question is,<br />
if i have the same measure and i want to have values from 2 different periods in the same crosstab,one period from the calendar one&#8230;and one the same but for the year ago&#8230;</p>
<p>Any help??</p>
<p>tnks one more time!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

