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

Report Studio Expressions/How to Call Data from a Year

Started by Peytonp, 09 Dec 2016 09:12:58 AM

Previous topic - Next topic

Peytonp

So i have a list box with monthly sales information. I'm trying to pull from Jan 1st to Nov. 30th. I keep returning the first month of every month for a year. In my query i have current monthly sales. My filter expression for that is...


if (extract(month,[Posting Period Start Datetime])=extract(month,_add_months(current_date,-1)) and (extract(year,[Posting Period Start Datetime])=extract(year,current_date)))

then ([Detail].[Detail Measures].[Sales])  else (0)

I then added a filter

[Detail].[Calendar Time].[Calendar Year]=extract(year,current_date)
[Detail].[Calendar Time].[Calendar Month]=extract(month,2016-12-30) -1

Can you tell me what I'm doing wrong>

bdbits

I am a little fuzzy on whether your data is relational or dimensional. Also, are you trying to replace the first filter with the second? What is not working?

sdf

i can sense that the idea is to get YTD or MTD.