# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for
Did you mean:
Creator

## [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

32 Replies
Specialist III

Maybe this:

Sum(UNITS)/count(all distinct WEEK)

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago
Creator
Author

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

Creator
Author

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

MVP

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

Creator
Author

Creator
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))

Creator
Author

Creator
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.

Creator
Author

look at webber and avunits/wk

Tags