Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Pragna
New Contributor III

Totals Function - Auto / Sum Issue

Hi All,

I am trying to get the total of a measure. But when setting the measure as Auto it giving a wrong total, But when I set the measure as Sum. It's giving the correct total value.

Below is the formula used for the measure.

=(Sum([Headcount Per Shift (people)])
*
(CEIL(round(sum(Load))/[Hours Per Day])))   /     (CEIL(round(sum(Load))/[Hours Per Day]))

Any help is greatly appreciated.

Thanks

2 Replies

Re: Totals Function - Auto / Sum Issue

Perhaps this?

Sum(Aggr((Sum([Headcount Per Shift (people)])
*
(CEIL(round(sum(Load))/[Hours Per Day])))   /     (CEIL(round(sum(Load))/[Hours Per Day])), Dim1, Dim2,..)

// Dim1, Dim2 are based on your dimension. If more, you need to add to come expected result.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Pragna
New Contributor III

Re: Totals Function - Auto / Sum Issue

Hi,

Thanks for your response.

I tried using the Aggr function as u mentioned but didn't get the expected result. 

 =(Sum([Headcount Per Shift (people)])
*
(CEIL(round(sum(Load))/[Hours Per Day])))   /     (CEIL(round(sum(Load))/[Hours Per Day]))

Here ,

Measure 1 =  (Sum([Headcount Per Shift (people)])
*
(CEIL(round(sum(Load))/[Hours Per Day]))) 

Measure 2 =  (CEIL(round(sum(Load))/[Hours Per Day]))

Regards,

Pragna