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

** Urgent help with calculation between date range!!!

Started by lorenmario, 26 Mar 2015 06:53:48 AM

Previous topic - Next topic

lorenmario

Hello!
I need a help for a challenge in a report that I am building, a calculation that returns me the date ranges in which a product was in stock.

Ex .: The product in this stock in March 01,02,03, then returned in March 10,11,12,13.
I need to create a calculated column called Periods in stock that show:

01/03 to 03/03, 10/03 to 13/03

See the attached report to better understand, the red column is the need to calculate that.

Someone managed to make a calculation so if you can help me thank you, it is urgent !!!

Thanks ;)




BigChris

That sounds more like something you'd need to do in the database...some like a loop (which Cognos doesn't really do)

lorenmario


navissar

Right,
First of all, nobody can answer that without knowing a lot more. You didn't even bother to specify whether you're working on relational or dimensional, what version of Cognos you're using or what's the underlying database, and where do the stock dates come from.
Second, this is obviously more of an SQL question than it is a Cognos question (Assuming relational). Whether you should use an ETL process or a SP as Chris suggested to loop through data or you can use some text aggregation functions (They exist) to do that is entirely dependent on your data source and your resources, and anyway both aren't Cognos functions.
Third, your post is in violation of at least 2 clauses of the forum etiquette. The 5-hour-bump (Really? You waited ALL OF 5 HOURS without getting a reply) and your dismissive manner towards Chris who gave you a sound advice aren't really making anyone particularly interested in lending you a hand.

lorenmario

Hi Nimrod Avissar,

I thanked Chris for posting, I asked if anyone else had any suggestions, did not despise the help offered by him.
If I violated any rule of the forum, I apologize, it was not my intention.

The report is relational, I'm using Report Studio 10.2.1, access an SQL database.

Thanks for your help.