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

Need to base a data item on a filter

Started by bignadad, 26 Sep 2013 05:41:15 PM

Previous topic - Next topic

bignadad

I want to include Last Year results in my list.

Im using this as my filter
[YearLY] = [Invoice].[Year] - 1

Now, how can i associate my data item to read from this?

My current data item is this
[Invoice].[Net Price]*[Invoice].[Quantity Shipped]

I duplicated that data item and called it LineTotalLY. How can i get it to only read last year?

Gopinath

Remove the filter and add a case statement in your  LineTotalLY data item as

CASE WHEN [YearLY] = [Invoice].[Year] - 1
THEN [Invoice].[Net Price]*[Invoice].[Quantity Shipped]
ELSE 0
END

bignadad

CASE WHEN [YearLY] = [Invoice].[Year] - 1
THEN total([Invoice].[Net Price]*[Invoice].[Quantity Shipped])
ELSE 0
END

I tried that on my LineTotalLY data item.

I made a list and put Return, LineTotal, LineTotalLY

But LineTotal and LineTotalLY are the same

blom0344

Try:

total(CASE WHEN [YearLY] = [Invoice].[Year] - 1
THEN [Invoice].[Net Price]*[Invoice].[Quantity Shipped]
ELSE 0
END)