cancel
Showing results for 
Search instead for 
Did you mean: 

Calculated measures VS calculated attributes

0 Kudos

Hello,

I'm a bit confused about the difference between Calculated measures and calculated attributes. I would be grateful if I could get a simple explanation in order to avoid this confusion in the future.

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

patrickbachmann
Active Contributor
0 Kudos

Hi YaYa,

I think the only difference is if you choose type MEASURE then you have several aggregation types available such as SUM, MAX, MIN, COUNT, and the option of performing the calculation BEFORE aggregation or after.  Whereas if you choose attribute type this calculate before aggregation option is not available (even if the attribute happens to be a number data type such as integer)

-Patrick

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

Calculated measures are calculations done on measures like sum(), avg(), mix(), max(), etc

Calculated attributes are calculations done on attributes eg: leftstr(product_name)+ '_'+ rightstr( product_brand) , eg: tv_sony, tv_panasonic, etc

Thanks,

Madhavi

former_member210482
Active Participant
0 Kudos

Hi Madhavi,

Calculated measures can also be done on attributes. Try it..

Regards,

Safiyu

former_member210482
Active Participant
0 Kudos

Hi,

Calculated measures can be aggregated but calculated attributes cannot be. And one more point to be noted is that at the end when used in calculation view, you have an option of aggregating your fields. So when you aggregate these calculated attributes it will do a count by default. You wont be able to perform sum on it. So to give a clear picture I will provide you the default aggregation performed..

Attributes and calculated attributes - Count(default),min,max

measures and calculated measures - Sum(default),min,max,count

date types - Min(default),max,count

Hope this helps.

Regards,

Safiyu

0 Kudos

Thank you for your answers!

patrickbachmann
Active Contributor
0 Kudos

Our pleasure.  And welcome to the community.

Former Member
0 Kudos

So the difference between calculated measures and calculated attributes is that one creates a measure, and one creates an attribute.

This is a critical difference because in a HANA model, you can only aggregate (SUM/MIN/MAX/COUNT) on measures. So if you need to consume your objects as an aggregated data type, you need to select MEASURE. It will then appear as a formula in the semantic layer.

If however you want to group by the object in your model then you need to use attribute.

Note that if you use a measure when you expect an attribute, you can get incorrect aggregations and therefore incorrect numbers.

If you use an attribute when you expected to use a measure, you can get an explosion in data volumes because you are not aggregating.

John

Former Member
0 Kudos

hi john,

If you use an attribute when you expected to use a measure, you can get an explosion in data volumes because you are not aggregating.

So how to do aggregate calculated attribute measures?

Thanks.

Br,

Ed

Former Member
0 Kudos

Sorry Ed I don't understand your question, could you please elaborate?

Former Member
0 Kudos

With SP6 onward they are just called calculated columns..

Previously if the the calculated column had a output datatype as measure or numbers it was called calculated measures and if the output datatype as text or value it was called calculated attributes