Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 14 Oracle Analytics Lounge
- 211 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 77 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Count number of weeks from a specific date

Summary
Count number of weeks from a specific date
Content
Hi,
I'm trying to create a measure which would tell me the number of weeks between a specified attribute (e.g. Week End Date) and a fixed date.
I tried to use WEEK_OF_YEAR but this function becomes an attribute! - so it's useless
Any help on this please? It sounds like a simple thing - yet I'm struggling with it for some time now.
Best regards,
Pawel.
Answers
-
TIMESTAMPDIFF(SQL_TSI_WEEK, some.date, someother.date)
0 -
Actually - maybe this small picture will help explain better:
As You can see in 3rd line the Count of Weeks is only 3 (because user didn't report time for 2 weeks) so his Utilization (Hrs/Count of Weeks) is Wrong.
With weeks 2 - I'm playing to find a way so that e.g. for June - no matter how many weeks are reported by whom - the measure returned should always be 5.
Regards,
Pawel.
0 -
Hi Christian,
Well, the above also results in a Attribute (not a measure) and let me explain my issue in more detail.
I have Week Ending date in my columns which I'm displaying as Months, Weeks, etc. So, I need to calculate the number of weeks between a fixed start date and the given week in my Week End Date column.
The point here is I'm trying to calculate YTD utilization - meaning I need to know the total reported hrs so far (I got that already) + the total number of weeks*40 (regardless if the user reported any hours in a week or not). The problem is that if I count the Week End Dates (distinct) from the data - I sometime miss a timecard (e.g. when user if on vacation or off sick). This means, that my utilization calculation will be wrong!
Hope it clarifies but I'm banging my head at this for days now
Best regards,
Pawel.
0 -
did you find an answer to this?
0 -
0
-
Hi @User_QXPKC ,
Welcome to the Oracle Analytics community and forum.
As suggested by @GayathriAnand-Oracle , it will be better if you post a new question, expressing your requirement, and also what product, and part of the product are you trying to achieve that.
Closing this thread as it was migrated across a number of forum over the years…
Thank you :)
0