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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Pragna
Contributor III
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
Anil_Babu_Samineni

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.

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
Pragna
Contributor III
Contributor III
Author

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