简体   繁体   中英

SUM up 4 measures in SSAS

I want to sum up 4 measures in SSAS and divide the total by 1 measure my code is as follows.

=Sum((Fields!Unique_Visits.Value)+Sum(Fields!Ask_the_Expert.Value)
+Sum(Fields!SSMembers.Value)+Sum(Fields!Poll_Members.Value))/
Sum(Fields!EnrolledMembers.Value)

If your measures are defined as using the SUM aggregate function (which is the default) then Analysis Services will do the summing for you and you just need to add the measures together and do the division

([Measures].[Unique Visits] + [Measures].[Ask the Expert] + [Measures].[SSMembers] + [Measures].[Poll_Members] ) / [Measures].[Enrolled Members]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM