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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total calculation

How do I calculate the total of all dimension for this:?

IF(SUM(timeworked)=0,0,(SUM(timeworked)/60)/COUNT(DISTINCT(MONTH)))

In other words I want something like this:

Sum(TOTAL(IF(SUM(timeworked)=0,0,(SUM(timeworked)/60)/COUNT(DISTINCT(MONTH))))), obviously this doesnt work.

THanks

1 Reply
swuehl
MVP
MVP

Which dimensions are you using? In what context / chart?

In a straight table chart, you can try using the sum-of-rows option on expression tab, in a pivot table or a text object try advanced aggregation:

SUM(

AGGR(

IF(SUM(timeworked)=0,0,(SUM(timeworked)/60)/COUNT(DISTINCT(MONTH)))

,DIMENSIONFIELD1, DIMENSIONFIELD2

))

you need to replace the advanced aggregation dimensions DIMENSIONSFIELDX with all your needed dimension fields.