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: 
lukeert19
Contributor III
Contributor III

calculate the avarage base a column

Hello to all

 

Hoe can calculate the average for each partcode base on PartL3 column?

 

axample in attached 🙂

 

thanks to all

 

🙂

 

 

2 Solutions

Accepted Solutions
sunny_talwar

@lukeert19 just change Sums to Counts

Count(pcs)/Count(TOTAL <PartL3> pcs)

 

View solution in original post

sunny_talwar

@lukeert19 May be this

Count(DISTINCT TOTAL <PartNumber> PartNumber)

View solution in original post

7 Replies
marcohadiyanto
Partner - Specialist
Partner - Specialist

Hi

Try this one

Sum(Pcs)/sum(total <PartL3> Pcs)

Regards

lukeert19
Contributor III
Contributor III
Author

thanks for replay @marcohadiyanto 

my mistake sorry, I can't use sum() function because PCS column is a formule --> count(pcs) and I can't put this formula into sum(count(pcs)) 😞

sunny_talwar

@lukeert19 just change Sums to Counts

Count(pcs)/Count(TOTAL <PartL3> pcs)

 

lukeert19
Contributor III
Contributor III
Author

hello @sunny_talwar and @marcohadiyanto   thanks a lot for your time.

by using the formula above is possible to calculate the avg based on PartlL3 field that it's good, fist report done, thanks a lot again

I have only last question about other similar report, I have attached a picure where in table I have 3 calculated columns

coloumn: qty consumed --> done with Count(pcs)

total P/N repaired: based on teh first column [partNumber] how can show the result like in the picture?

avg column based on qty consumed  and total P/N  Repaired -->how can calculate the result like in the picture?

sunny_talwar

@lukeert19 May be this

Count(TOTAL <PartNumber> PartNumber)
lukeert19
Contributor III
Contributor III
Author

hello @sunny_talwar I have already tried but the number shown from qlik isn't real, I need to use one formula like below

 

Count(distinct <ID> PartNumber)

 

 

 

but I don't know how I can correct this formula 😞

sunny_talwar

@lukeert19 May be this

Count(DISTINCT TOTAL <PartNumber> PartNumber)