cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Creating calculated measure using attribute?

Former Member
0 Likes
815

Dear all,

    In my scenario,

1. I need to find the difference between 2 dates(output integer value) and use this output as a measure, as I need the sum and average of this compared to Vendor attribute.Hence i created a calculated measure as below.

But when add this calc measure in the data preview I get error "Calculation problem :One of your aggregated measures is not numeric".

Please note the syntax and activation happens without any errors.

Do you think iam doing right? or its not possible to convert an integer attribute to measure ?

2. A similar calculated attribute with "daysbetween" works fine for me. So incase Iam using BO Analysis tool for generating reports, can I use this calc attribute as measure here?

Thanks in advance!

Cheers!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi,

1. That formula of yours is perfectly fine and works for me on revision 35 - no data preview errors and it calculates it correctly. You don't even need to convert it to int() as the result of daysbetween() is an integer value anyway. If you are on an older revision, suggest you upgrade. If you are already on the latest - do you have another calculated measure within your view? May be that's where the problem is.

2. Not sure if I understand your question correctly - do you want to use a calc attribute as a measure in BO analysis tool? Don't think it is possible, even it works HANA wouldnt aggregate attribute values for you automatically.

Thanks,

Anooj

Former Member
0 Likes

Hi Anoop,

  Thanks for response!

1. This is the only calc measure Iam using. So according to you, i can create a calc measure using 2 attributes? btw, my SAP HANA Studio version is 1.0.26.

2. This is bad news for me . So how can I convert the difference between 2 date attributes (which is my key figure) into a measure in Analytical view?

Thanks again!

Vittali

Former Member
0 Likes

Hi,

Yes you can use attributes within a calculated measure for scenarios such as yours, where you want calculate a measure based on a particular attribute value etc and yeah it can refer to any number of attributes within the measure. The result just needs to be in one of the data types that a measure supports.

The easiest thing to do is to upgrade from rev 26 to 35 or 36 is the latest available now. As I said above, your exact formula works without a problem for me.

Thanks,

Anooj

Former Member
0 Likes

Hi Anoop,

  Thanks for response again!

Do you mean the formula with the same fields( same data type for BUDAT) works for you ? If I validate the formula i get no error, but when only when I add this calc measure into the value axis section in data preview, I get the error message.

I guess, as you send atleast one of the measure data type should match to the atttibute data types, may this could be the reason?

I will check with my basis team if I need special procedure to update the Studio or I can do it online, and try updating the Studio.

Wish you nice week ahead!

Regards

Former Member
0 Likes

Thanks Anoop!

Upgrade from rev 26 to 35 or 36 for Studio worked for me. The new version has some good noticeable enhancements also.

Cheers!

Answers (0)