Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
nikolis_gr
Contributor III
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).

Date is calculated during the data loading

LOAD SAMPLED,

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:

ResourceDateSAMPLEDRate
A12/1/20181/12/2018 16:156144799
A12/1/20181/12/2018 16:307466835
A12/1/20181/12/2018 16:456278066
A12/1/20181/12/2018 17:006138748
B12/1/20181/12/2018 16:156954240
B12/1/20181/12/2018 16:308249710
B12/1/20181/12/2018 16:456817208
B12/1/20181/12/2018 17:007067755
1 Solution

Accepted Solutions
Anil_Babu_Samineni

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

View solution in original post

3 Replies
FelipeFuku
Partner - Contributor III
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.

sunny_talwar

Try this

Sum(TOTAL <Resource, Date> Rate)

or you can try this

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

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