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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Average in pivot table

I have sales data based on salesman and city.

I need to display it in pivot table and get averages

   

CityAB
Salesman
AAavgavg
BBavgavg
              Avg of City AAvg of City B

and i'm using previous days data

i use below expression, but figures are wrong

=ceil(Avg({$<date={"=date>=Date(ReloadTime()-1,'DD-MM-YYYY')"},type={"I"}>}

((sales)), 0.01)

Thanks

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda
MVP
MVP

try

=ceil(Avg({$<date={"$(=date(ReloadTime()-1,'DD-MM-YYYY'))"},type={"I"}>}

sales), 0.01)

or

=ceil(Avg({$<date={"$(=date(ReloadTime()-1,'DD-MM-YYYY'))"},type={"I"}>}

total <City> sales), 0.01)

View solution in original post

5 Replies
MK_QSL
MVP
MVP

Sample data or sample application please !

anuradhaa
Partner - Creator II
Partner - Creator II
Author

see attached

Kushal_Chawda
MVP
MVP

try

=ceil(Avg({$<date={"$(=date(ReloadTime()-1,'DD-MM-YYYY'))"},type={"I"}>}

sales), 0.01)

or

=ceil(Avg({$<date={"$(=date(ReloadTime()-1,'DD-MM-YYYY'))"},type={"I"}>}

total <City> sales), 0.01)

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

PFA

jonathandienst
Partner - Champion III
Partner - Champion III

The sample SOURCE data is totally unhelpful. Your query is about a QV sheet object. You need to upload the qvw model or a sample containing the object and displaying the problem.

I suspect that it is to do with the fact that a pivot table does not sum the rows, it applies the expression to the total data set - and this value may not be the same as the sum of rows. If you post a useful sample qvw doc you will get more specific and useful help.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein