Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikconsultant
Creator III
Creator III

Problem with aggr?

I have a pivote table that shows the downtime of machines. This table has the 2 dimensions week and downtime cause. I need to calculate a percentage value for the downtime.
Basically the expression is Sum(Downtime)/Total(PlannedTime per week)
I use this formula:

Sum(minutes_downtime)/Sum(aggr(Sum(PlannedTime), Week))

But it does not work properly. I only see results in 1 row.

Thanks for any tips or hints.

Labels (1)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think you want to use TOTAL rather then Aggr() here. 

Sum(minutes_downtime) / Sum(TOTAL<Week> PlannedTime)

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think you want to use TOTAL rather then Aggr() here. 

Sum(minutes_downtime) / Sum(TOTAL<Week> PlannedTime)

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

qlikconsultant
Creator III
Creator III
Author

Thanks.