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

compare prior MTD sales with MTD in daily basic

Started by Cognos88Newbie, 13 Oct 2017 08:25:37 AM

Previous topic - Next topic

Cognos88Newbie

Hi, I would like to ask how I can compare prior MTD sales with MTD in daily basic.  I tried to create 2 different query but is not working.

eg:

Date (MTD) :      1/2     2/2     3/2     4/2
Amt                   10       20      30      40

Date (Pr MTD) : 1/1     2/1     3/1    4/1
Amt                 50       60       70      80

VsDaily:            0.20     0.33   0.42   0.50

Something like that.

Thanks in advance.

venkat01

#1
I would creat two dataitems one is for MTD as case when Date >= trunc(current_date,'month') AND Date <=current_date then total(Amt) end
another one is for PMTD as
case when Date >= trunc(_add_months(current_date,-1),'month') AND Date <=_add_months(current_date,-1) then total(Amt) end
now you have two values you can compare these two dataitems apply any conditional formatting or whatever you want hope this helps you

Sent from my HTC One XL+ using Tapatalk

venkat01

If you need daily same way creat 2 dataitems Currentday as case when Date >= trunc(current_date,'day') AND Date <=current_date then total(Amt) end
Prevmonthcurrentday as case when Date >= trunc(_add_months(current_date,-1),'day') AND Date <=_add_months(current_date,-1) then total(Amt) end
then compare daily sales monthovermonth

Sent from my GT-N8000 using Tapatalk