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

Date Range Expression

Started by kpagel, 11 Jun 2019 03:51:22 PM

Previous topic - Next topic

kpagel

I have created a Query Calculation to total ([dms].[inv].[tot_net_amt]). However, I only want it to total that value if [dms].[inv].[trans_date] is during a given calendar year (i.e., 2018, 2019, etc.). What is the best approach to create this expression?

kpagel

I have created a Query Calculation to total ([dms].[inv].[tot_net_amt]). However, I only want it to total that value if [dms].[inv].[trans_date] is during a given calendar year (i.e., 2018, 2019, etc.). What is the best approach to create this expression?

CognosPaul

easiest way would be to do total(case when [dms].[inv].[trans_date]  in (2018, 2019) then [dms].[inv].[tot_net_amt] else 0 end )