BusinessObjects Board

last month

Hi,

I have a requirement to calculate the last month.

Actual scenario:
User entera a date range and wants to see data that comes from before a month. where there are other attributes that fall would be calculated as per the given date range.

Report Scenario:
User is prompted to enter a date range ( creation from and creation to date and above that date range I am substituting a report variable as

report object:
days between
[syntax:: =DaysBetween( ,CurrentDate())]
close date object is a direct universe date object.

the above report object [days between] has to be calculated for last month.

So I had created a report object and had given a direct calculation
-30.

Since we have months with 28,30 and 31days. the above scenario won’t fetch effective result.

Could you kindly help how I could counter the above issue.

I had tried the below mentioned report object to solve this issue. but the syntax is wrong. could you kindly help me out.

Previous month
= If (MonthNumberOfYear(CurrentDate())=(β€œ1”,β€œ3”,β€œ5”,β€œ7”,β€œ8”,β€œ10”,β€œ12”) )then days between - 31 else If MonthNumberOfYear(CurrentDate())=(β€œ4”,β€œ6”,β€œ9”,β€œ11”) )then days between - 30 else days between - 28

Thanks
Regards
Shible


shible (BOB member since 2006-12-26)

Create Universe Objects for Previous Month Start Date and Previous Month End Date. Use these objects to build your report.

Check this thread:
https://bobj-board.org/t/152613


BO_Chief :us: (BOB member since 2004-06-06)

BO_chief, I’m sorry, but I checked out your link for start of previous month and end of previous month and those formulas won’t transfer to a web intelligence formula as shible had requested. Can you re-do those formulas so we can adapt them to Webi please? I’m looking for this too. Thanks!
Jim


dammitjim30 (BOB member since 2011-03-23)