Categories
Need help with calculations

Summary
Need help with calculations
Content
Hi Everyone,
I have just started using Oracle DVD and stuck on a couple of things.
1. How do i calculate last year date using the 'Date column' in the data. I could generally use something like Lookup([column_name],-12) in tableau which would give me data related to last year current month. I have not found the same functionality on DVD.
2. Also, how do you convert the data type. My date column is showing up in 'string' format and in need to change it in 'Date' format.
3. I need to understand if there are any ways i can create parameters or variables in DVD. for example.I have a scenario where i am trying to compare data related two different dates..something like sales current year Vs Sales Last year. How can i accomplish this on Oracle DVD.
Thanks and Regards,
Shripad
Answers
-
No not really but since you don't seem to understand my point and correct it, allow me. ( this is the solution for your second point)
So imagine you have an Excel source with dates as text:
And now let's try to change the type at import:
So now we have this:
Let's run this:
Well oups. Back to the drawing board.
Let's try what Syed said:
Hmm nope
Let's try the other one:
$
Hmm nope.
Ok so let's read the documentation for a second: https://docs.oracle.com/middleware/bidv1221/desktop/DVDRN/GUID-3EC72AE5-A979-4E2D-AF43-BCC11828C0D7.htm#GUID-3EC72AE5-A9…
See it already?
Let's add to the Excel sheet and follow the doc:
Note that I leave it as text!
Now let's try the conversion function again:
Oh neat:
hey wait that means we may even do this at Import:
Result:
So no conversion function needed.
tl;dr - your dates must be in a PRECISE format. Just wanted to spell things out.
0 -
It's nice that you tell him how to cast a DATE as a Date
0 -
Very funny!!...right? @Christian Berg
0 -
Hello Shripad,
1) To calculate Last Year Date using date column you can make use of "Add Calculation" at the bottom of the Project
2) To convert datatype of a column you can make use of CAST function
0