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

cumulative sum

Started by andoid95, 22 May 2014 06:12:05 AM

Previous topic - Next topic

andoid95

hello guys,

I have a relational PACKAGE and I want to calculate the sum of amounts from January until the month specified by user.
Ex: If the user selected  September 2013 so I have to give him the sum of amounts from 1 January 2013 to September 201

Thks

MFGF

Hi,

You could add a filter using the following approach for the expression:

[Your Date item] between _first_of_month (_add_months (?Your Date parameter?, 0 - (extract(month, ?Your Date parameter?) -1))) and ?Your Date parameter?

Cheers!

MF.
Meep!

andoid95

What do you mean about ?Your Date parameter? i just have ?year? and ?month? like parameter

MFGF

Quote from: andoid95 on 22 May 2014 07:03:46 AM
What do you mean about ?Your Date parameter? i just have ?year? and ?month? like parameter

Do you have a date in your data? If so, use this in the expression and a single date parameter (as in my suggestion) and you will get a single date prompt (appearing as a calendar)

If not, what format/data type is your month item? Is it a month number? What about year - is it numeric?

MF.
Meep!

andoid95

the date format I have is "March 23, 2005" and I can not extract the month in this format
is it exists a function that can convert this format in numeric ?

MFGF

Quote from: andoid95 on 22 May 2014 07:18:22 AM
the date format I have is "March 23, 2005" and I can not extract the month in this format
is it exists a function that can convert this format in numeric ?

So is this value a date field formatted to display as Month Day Year or is it a character field?

If (as I hope) it's the former, then use this item in the expression I gave you originally and it should work.

Cheers!

MF.
Meep!

andoid95

i have a GL date column (MMDDYYYY) i tried with it

MFGF

Quote from: andoid95 on 22 May 2014 07:33:34 AM
i have a GL date column (MMDDYYYY) i tried with it

Did it work? What was the result? Is it a date data type or a character field (or is it numeric MMDDYYYY)?

MF.
Meep!

andoid95

i complicated my life i just did [Relational Layer].[Period].[Fiscal period (YYYYMM)] between ?p_Year?|| '01' and ?p_Year?||?p_Month? and it works so !

thks a lot cause you have inspired me with the "betwwen"  8) ;) ;)