Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


I have Date,product,Quantity_Sold columns and I want
Product, MTD(month Till date),YTD(Year Till Date) as output.


Can anyone help me with the logic in getting MTD i.e
quantity sold from 1st of this month to till date (i.e. 01-
11-2013 to 26-11-2013) and YTD i.e QTD sold from 1st date
of the year to till date(i.e. 01-01-2013 to 26-11-2013).


Sample output model:

Product MTD YTD



I have Date,product,Quantity_Sold columns and I want Product, MTD(month Till date),YTD(Year Till D..

Answer / naresh

HI All,
Follow below steps to achieve this

1) In Filter condition place the below condition (to_char([START_DATE],'YYYY')=to_char({sysdate},'YYYY') and [START_DATE] <= {sysdate})

2)Create one Derived colum as MTD and in Expression use below code

case when (to_char([START_DATE],'MM')=to_char({sysdate},'MM') and [START_DATE] <= {sysdate})
then [Quantiry] end

Next in properties if this column for aggrigate Function and for Rollup Aggrigate Function change 'automatic ' to 'None'.
3) create one more Derived column as YTD and in expression use below code
case when (to_char([START_DATE],'YYYY')=to_char({sysdate},'YYYY') and [START_DATE] <= {sysdate})
then [Quantity] end

here sysdate is oracle date function.

Thats it .

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Cognos Interview Questions

What is the difference between a cascading report and drillthru report? Why do we go for drill thru report?

0 Answers  


wt is tupple , Embed function ? wt is regular dimension ?

1 Answers  


How to change Boolean variable Yes As "TRUE" and No as "FALSE" in Cognos reporting studio?

2 Answers   Wipro,


How much time it will take to develop a report in real time? It depends upon the complexity of the report, so tell me the approximate time period for a simple list, cascading, master-detail, drill-through,..…etc?

3 Answers  


How to create a Ratio in Cognos Report studio Reports?

1 Answers   IBM,


-------------How to do Bursting a Report?

1 Answers   Cap Gemini,


wt is the OLAP Scrubbing in Framework manger & use? How can we developed a query items by using alredy existing query items?

0 Answers  


plsreply to me...im interested to do the cgnos certifications relating to report developer.can you suggest me what kind of certifications andwhere cani get (dumps) previous quetions and answers for the certification........

0 Answers  


5. Which type of report you build more, list, crosstab or chart and why?

0 Answers   IBM,


A list box contains 1000 records, while running the list, inside the header the content has to scroll down. Note the header should not go up?

1 Answers  


How to use Cascade Macro in Report studio? Anybody know about Cascade Macro & and the procedure to use?

1 Answers   AIG, Niteo,


What is the abrevation of .PPR? (Power play report) or anything new?

1 Answers  


Categories