on 01-08-2015 3:04 PM
I am trying to create some calculated key figures in an calculated view in Hana Studio using this type of logic:
Need to aggregate the key figure based on the last 12 months of data.
For example if the Last month loaded is 11/2014
Then I want to aggregate from 11/2014 to 12/2013.
My problem is in how to figure out the last_loaded date from the overall model.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found a way that describe using Ranking in a Graphical view. I will try the same using Max Date to see if I can implement this solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Sree,
Tried to use the Scripted calculation view, but could not find great examples in how to use the variables when I would set the Max Date or other parameters. I'm sure that it is a syntax problem. I saw one reply for a similar problem showing how to accomplish the ranking issue three ways in HANA studio:
For your c
se, better if you use a scripted calculation view specific to the max functionality and other related functionalities. Then you can use the same scripted calc view into your business logic(may be a another calc view) . Using the rank calculation method for this scenario is not a perfect deal . If you are facing syntax errors in achieving it, share the snippet to us, after checking online documentation/
Sree
Hi Jeff,
To find max date, use below query:
SELECT MAX(Date Field) FROM TABLE and you will get the max date
In Calculation View, you can create a Calculated Column say "MAX" as MAX(Date Field) to get max date
Regards,
Vivek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Vivek,
Thanks for your response. I understand how to get to a max date in a select statement from a table. I will try to clarify.
I have a calculated view that has two tables one for netsales that is load monthly and one that has a yearly tally for overall volumes of product sold. I need to have a aggregation of the netsales based on the last month loaded and the previous twelve months. I tried to use the now function to figure out what my date is and work backwards from there but since the business might not have December numbers loaded then I need to see that November 2014 was the last month loaded. I realize that HANA studio might not be were I want to do this and I can do this in the reporting tool but I run into performance issue in the reporting tool so I thought I would start in Studio first.
Thanks
Jeff
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.