BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Follow BOB on Twitter! 
Follow BOB on Twitter! (Opens a new window)  

General Notice: Upcoming Events: PGHBOUG: Aug 23.

[Webi 4.x] Trends table and backwards calculations.


 
Search this topic... | Search Web Intelligence... | Search Box
Register or Login to Post    Forum Index -> Building Reports -> Web Intelligence  Previous TopicPrint TopicNext Topic
Author Message
mbakker
Forum Member
Forum Member



Joined: 04 Jul 2018

Posts: 1



PostPosted: Wed Jul 11, 2018 5:21 am 
Post subject: Trends table and backwards calculations.

I'd like to create a weekly trends table, show opened and closed requests, orders, etc. And do some backwards calculations, e.g. calculate number of open orders 7 weeks ago, based on the number of opened/closed orders and the number of open orders right now.
It's easy enough to get the week from the creation dates and put it all in an excel pivot-table, but how can I automate this in webi?

I can get the starting week, as requested by the user in the prompts :
=Week(ToDate(UserResponse("psCreated after");"MM/dd/yyyy hh:mm:ss a"))

And calcultate the number of weeks between then and now :
=TimeBetween(ToDate(UserResponse("psCreated after");"MM/dd/yyyy hh:mm:ss a");ToDate(FormatDate(CurrentDate();"MM/dd/yyyy hh:mm:ss a");"MM/dd/yyyy hh:mm:ss a");WeekPeriod)

I know how to put this in an array in other languages, but fail to find how to do this in webi?

Thanks,
Marco
Back to top
mikeil
Forum Associate
Forum Associate



Joined: 18 Feb 2015

Posts: 584
Location: Europe



PostPosted: Wed Jul 11, 2018 1:48 pm 
Post subject: Re: Trends table and backwards calculations.

You don't have arrays in Webi.

One approach would be to define 14 variables - seven for the orders opened each week, seven for the closed - and calculate backwards using those.

It gets messy, but it's not too bad if the user is sure what he/she wants and doesn't change it.
Back to top
Mark P
Forum Devotee
Forum Devotee



Joined: 03 Feb 2003
ASUG Icon
Posts: 11011
Location: Manchester, UK


flag
PostPosted: Thu Jul 12, 2018 4:05 am 
Post subject: Re: Trends table and backwards calculations.

Hi Marco,

Webi isn't a programming language and doesn't have the concept of arrays. It does have variables and blocks and works well with databases.

Personally I'd suggest two options, depending on the time available:

Best option but time costly is to build the solution into a database table, recording a daily snapshot position, which you can then easily use in your BO universe.

The second option, which is messier, is to build a cross table and use calculations based on the start and end of each week to calculate orders/requests opened, closed, still open, etc.

_________________
Current version I'm using: 4.1 SP3 over Oracle. Well versed in SQL Server too, including SSIS

______________________________________
Prior versions used: BO3,4,5,6.5,XIr2,XI3, 4.1 - yes, I have been using BO since 1996!
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Building Reports -> Web Intelligence  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0303 seconds using 17 queries. (SQL 0.0028 Parse 0.0009 Other 0.0266)
CCBot/2.0 (http://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo