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

SALES BEFORE and AFTER the selected date

Started by sanchoniathon, 05 May 2015 10:59:33 PM

Previous topic - Next topic

sanchoniathon

Hello to all,

1- We need to allow the user a date selection (a specific day)
2- We also need the user to enter a value that will represent the number of weeks that we want to compare. For example the user selected 1-Jan-2001 and entered the value 4 in the number
of weeks prompt, therefore we want to show the SALES$ 4 Weeks BEFORE the selected date and then 4 Weeks AFTER the same selected date.

Is this possible and how please describe.

Thanks !

schrotty

Hello sanchoniathon,

i think this is simple.

A week is always 7 days, so you can multiplicate the numbers of weeks with 7 and add/subtract them to your selected date.

Filter condition:
[Your Date Field] between _add_days(?p_a_specific_day?; (?p_number_of_weeks? * -7)) and _add_days(?p_a_specific_day?; (?p_number_of_weeks? * 7))

:)

schrotty.

bvk.cognoise

HI Sanchoniathon,

PFA XML hope it helps you or else you can try following expression

[Sales (query)].[Time].[Date] between _add_days (?Select Date?,-[Data Item1]) and  _add_days (?Select Date?,[Data Item1])

in Data Item1 use following expression

?number of weeks?*7


Regards
Bvk
Regards
BVK

schrotty

hey Bvk,

same idea at the same time  :D

sanchoniathon


sanchoniathon

Hello agin,

By the way i need to have a COLUMN showing the sales a number of months BEFORE the selected Date  and another column showing the sales of a couple of months after that selected date.

SO both columns should be displayed next to each other the report. Is this still possible ?

Thanks !