Next 6 months Data In OBIEE - obiee

I want to display Next 6 months Data from Current Month in OBIEE 11g.I tried with addmonths() but it shows all years in data,and if i filter on current year it will not shows months in next year.

It all depends - and that why someone voted down your question; it's just not very precise.
What do you want to compare it with? A month number? A month name?
Do you have what's needed? Do you have a properly formed time dimension?
The unclean approach is to use TIMESTAMPADD butwith that you're just curing the symptom, not the root cause.
TIMESTAMPADD(SQL_TSI_MONTH, 6, NOW())

Related

Attendance tracker: Only count days Absent, Present, Late etc.. from previous days till present

I have a google sheet that I use an attendance tracker for our business. This sheet reads month tabs and tally's the total Days present, Absent, Late etc..
The issue I am running into is that when someone plans a future time off or prearrange lateness I don't want it to tally that until it becomes the present day.
Essentially it should only tally up the present day and the past.
Thanks for the help.
In the "Report 2022" tab it shows Employee 15 having 6 Present days and 2 AR days. That totals to 8 "Working days count" , thats not accurate because the 2 AR days didnt happen yet; they are future dates.
If you look in the November tab it is counting the AR for future dates, I only want it to count past and present.
I haven't really came up with an idea, I tried the today function but I don't know exactly the best way to go about it.
Here is the sheet with Dummy employee data: https://docs.google.com/spreadsheets/d/103srHeFcJXvVKNn3w4ljuxAbnpMMy3YNHS4EJthx1pw/edit?usp=sharing

I am trying to do a Month Over Month review but not all months have data and the users want placeholders for the months with no data

I am trying to do a Month Over Month review but not all months have data and the users want placeholders for the months with no data. I was trying to use my start and end date parameters but I am not getting anywhere.
I am using SSRS - attempting to use a matrix to show on the left hand side for the rows the Month and the column grouped by current year and prior year which is generated from my date parameters. I have four date parameters; a current year star, current year end, prior year start and prior year end.
I can get the matrix to populate if the prior year has data for a month that the current year does not and vice versa but I cannot get the data to populate with a placeholder for a month with no data.
Has anyone had success doing this without using a CTE?

Problems with .resample('M')

I am using pandas & I have a dataframe with Date, Item#, Qty and 12 months of sales data. I want to do a std dev calc to understand the monthly variability for each Item#.
The problem is for many Item#'s the sales are sporadic: I may only sell Item XYZ in Feb and Mar, and zero the rest of the months of the year.
I am using this code to do the heavy lifting:
df.groupby('Item#').resample('M').sum()
For some Item#'s it is forcing zeros into the empty months (GOOD!), but in many cases it is just showing, say, two months of data, instead of 12, which then makes the std dev calculation incorrect.
Can someone help me understand why this behaviour of the .resample method? How can I workaround this problem?
Many thanks in advance for your help!

Combining year-month data to continuous month variable (lubridate)

ExampleI've got the following dataset year-month variable going from 1995 to 1999 and months 1 to 12.
The months start at 1 again at each new year. I want to create a continous month variable from 1 to 60, i can't find the correce lubridate code for this, any suggestions?
Much appreciated,
Best regards, Joris

Retrieve data based on current ISO week and backwards

I have to work with data retrieved and grouped on a weekly basis (ISO week) and my DB is structured on a daily basis (field: DATE). I need to write down a code which is rolling, so that given the current date, it calculate the week and the retrieve data in the previous 3 weeks, too.
So I write in the WHERE clauses:
TO_DATE(TO_CHAR(DATE, 'YYYYWW')) BETWEEN TO_DATE(TO_CHAR(TO_DATE(running_date, 'YYYYMMDD'), 'YYYYWW'), 'YYYYWW')-3 AND TO_DATE(TO_CHAR(TO_DATE(running_date, 'YYYYMMDD'), 'YYYYWW'), 'YYYYWW')
It doesn't seems to work though.
Any suggestions on how to handle the problem?
Thanks a lot!
You have to subtract 21 days when you want to recive the previous 3 weeks. If you subtract 3 then you recive only the last three days.
You need to use 'IW', not 'WW' as the format mask for ISO week. From the Oracle docs:
IW = Week of year (1-52 or 1-53) based on the ISO standard.
WW = Week of year (1-53) where week 1 starts on the first day of the year and
continues to the seventh day of the year.

Resources