Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Create a second date range from a prompted one

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Create a second date range from a prompted one
 Login/Join
 
Member
posted
Hi There

I'd like to get a Prior Year comparison. For this matter I would like the user to enter a current year date range. E.g.


ValutaDatum GE '&ValutaDatumvon.ValutaDatum von TTMMJJJJ.'
AND
ValutaDatum LE '&ValutaDatumbis.ValutaDatum bis TTMMJJJJ.'

This one is easy. However from this range I'd like to get the second range (Prior Year), which I don't how to make it work, as I cannot use the "defined" filter (Datefrom, Dateto) field in another filter.

Ideally I would do it like that:
ValutaDatum GE dateadd('&ValutaDatumvon.ValutaDatum von TTMMJJJJ.','Y',-1)
AND
ValutaDatum LE dateadd('&ValutaDatumbis.ValutaDatum bis TTMMJJJJ.','Y',-1)


Looking for a elegant solution instead of asking the user for 4 dates (2 ranges).

thanks & regards

This message has been edited. Last edited by: Tamra,


Webfocus 8.1
Windows 7
HTML, Excel, PDF
 
Posts: 10 | Registered: November 09, 2015Report This Post
Master
posted Hide Post
Look up DATEADD. You can easily subtract a year from your VON and BIS values. Just use 'Y' as the second argument and -1 as the third.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Member
posted Hide Post
HI George

I tried this, but however it wouldn't work..this is the filter set. In the report I am able to select the value range, however only the selected is displayed, but the selected through "DATEADD" is considered..

Can you see my mistake?

(ValutaDatum GE '&ValutaDatumvon.ValutaDatum von TTMMJJJJ.' AND ValutaDatum LE '&ValutaDatumbis.ValutaDatum bis TTMMJJJJ.' ) OR
(ValutaDatum GE DATEADD(&ValutaDatumvon.ValutaDatum von TTMMJJJJ.,'Y',-1) AND ValutaDatum LE DATEADD(&ValutaDatumbis.ValutaDatum bis TTMMJJJJ.,'Y',-1))

thanks


Webfocus 8.1
Windows 7
HTML, Excel, PDF
 
Posts: 10 | Registered: November 09, 2015Report This Post
Guru
posted Hide Post
Hi ValEit,

To verify that the syntax is correct for the WHERE statement you can create a new defined field or compute and add the logic, run the report and see if the value is correct.

Searching the WebFOCUS or InfoAssist forums for DATEADD will provide a few ideas on coding this.

calc date minus 1 month, like edate(MM/DD/YYYY,-1)

need a report with last 18 months from current


Run a few more searches to find more specific related suggestions.

Please update the subject line with tag words found at Tag your topic with keywords

Thank you for participating in the Focal Point Forum.

Kindest regards,
Tamra Colangelo
Focal Point Moderator - Information Builders Inc.
* Summit 2016 – June 13-17 in Reno, Nevada  - http://www.informationbuilders.com/events/summit


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
 
Posts: 487 | Location: Toronto | Registered: June 23, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Create a second date range from a prompted one

Copyright © 1996-2020 Information Builders