Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[1}

Sum(UNITS)/count({1}total distinct(WEEK))

This does not return the correct answer. Essentually I have 33 weeks of the fiscal year so far and for this sales representative she has only written busines in abot 20, so qkiksense is ging me her average per week based only on the weeks she rote business, infalting her true average per week which is divided by all weeks.

I attemped to to put the {1) in here to tell qlik to include all totoal distinct weeks YTD and it gives a me weird and wrong number

Your help apprecaited.

32 Replies
Thiago_Justen_

Maybe this:

Sum(UNITS)/count(all distinct WEEK)

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
Anonymous
Not applicable
Author

sorry no, tried all, total, your format above, all wrong numbers as answer which I validate manually to ensure.

Anonymous
Not applicable
Author

what is interesting is that my formual works in a table, but not in a KPI onbject. Exact same formula.

sunny_talwar

Would you be able to share a sample or an image to show it working in table, but not in KPI?

Anonymous
Not applicable
Author

Screenshot of Google Chrome (2018-06-18, 7-18-48 PM).png

Anonymous
Not applicable
Author

look at "webber" then look at 2018 av/wk is 25.956

here it is in the KPI object, exact same expression:  sum(units)/count(total distinct(week))

Anonymous
Not applicable
Author

Screenshot of Google Chrome (2018-06-18, 7-20-57 PM).png

Anonymous
Not applicable
Author

here it is 36 becasue it is dividingby her total number of weeks biut not by the actual number of weeks, I thought "total" would do that.

Anonymous
Not applicable
Author

look at webber and avunits/wk