If you are unable to create a new account, please email support@bspsoftware.com

 

Using a Measure as a constant number in Calculated measures in a crosstab

Started by leahmarie, 09 May 2011 03:00:46 PM

Previous topic - Next topic

leahmarie

Ok so I am rather new to Cognos, I've only been using it for about 2 months, so if this is impossible or a silly question, I apologize in advance.

But basically I am creating a report that is supposed to be a replica of a p&l analysis with respect to budget in Cognos so that they can drill down to levels based on category.  The measures are obviously different based on each category, some are by day some are percents some are averages and some are just totals.  That all being said, my question is they want the per day cost based on Supplies, Food, and other.  The two measures I have are $ amt and Days.  I would normally just Divide the two or use a function as either a query calcualation or a calculated measure, but since it is a dimensional cube, there is no days data associated with Supplies, Food and other. So it just gives me divide by zero whenever it runs.  I have been trying to make the days information constant, by creating a data item, or singleton, but neither has worked.  The days data is just one number, but it will change based on which level and date they select in the prompt page before the report is ran otherwise I could just use the number itself.  Any help at all is appreciated!:)

leahmarie

I actually figured this one out myself, but in case anyone didn't know, all you have to do is use a tuple, which I didn't understand until just recently.  value(tuple( two measures where you want the intersection))

barrysaab

Boy! Cognos getting on to me!!!