Announcements
cancel
Showing results for
Did you mean:
Contributor III

## Calculate sum, 3 dimensions 1 measure

Hi community,

I  wish you helped me figuring out the following:

I am using a table (3 dimensions : Resource, Timestamp, Date, 1 measute :Rate).

DAYNAME(SAMPLED) AS Date,

..

I thought that the following would sum Rate per resource per date but it just populates the existing measure per resource per timestamp:

sum(Aggr(Rate,Resource,Date))

Any help?

Sample Data:

 Resource Date SAMPLED Rate A 12/1/2018 1/12/2018 16:15 6144799 A 12/1/2018 1/12/2018 16:30 7466835 A 12/1/2018 1/12/2018 16:45 6278066 A 12/1/2018 1/12/2018 17:00 6138748 B 12/1/2018 1/12/2018 16:15 6954240 B 12/1/2018 1/12/2018 16:30 8249710 B 12/1/2018 1/12/2018 16:45 6817208 B 12/1/2018 1/12/2018 17:00 7067755
1 Solution

Accepted Solutions

IS that what you mean?

sum(TOTAL <Resource> Rate)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
3 Replies
Partner - Contributor III

Hi Nikolis,
Try changing the expression.. it should be like this:

Aggr( Sum(Rate), (Resource,Date) )

This way, you'll sum Rate, grouping by Resource and Date.

Please, let me know if it works.

Att, Fukumoto.

MVP

Try this

`Sum(TOTAL <Resource, Date> Rate)`

or you can try this

`Aggr(NODISTINCT Sum(Rate), Resource, Date)`

IS that what you mean?

sum(TOTAL <Resource> Rate)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful