Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
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

1 Solution

Accepted Solutions
Kushal_Chawda

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

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