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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

problem in data and calculating avg in the straight table

hi

i have a problem with the data and i need to calculate the average value in the table can anyone suggest me how to do

7 Replies
tresesco
MVP
MVP

Avg() ?

Not applicable
Author

Are you having any particular issue or do you just need to know how to use the avg() function?

Not applicable
Author

in a straight table i have fields as month april may june and its data i need to calculate the (april+may)/2 then

{(april+may)avg}/2 so on how can i

hic
Former Employee
Former Employee

If you have the months as different columns, you should most likely use the Crosstable prefix when you load the data:

http://community.qlik.com/blogs/qlikviewdesignblog/2014/03/24/crosstable

Further, you should look at averages here:

http://community.qlik.com/blogs/qlikviewdesignblog/2013/07/29/averages

HIC

Not applicable
Author

avg("Field you are averaging here"). If you make selections on your months, this expression will return the average.

For example, if you select months April and May, avg("Field you are averaging here") will return (April + May)/2

Not applicable
Author

hi henric

you can have a look at this excel file this is the requirement

Not applicable
Author

you can have a look at the excel file and in the excel file the first row that from mar-13 is the sum of my inventories and for that i need to calculate the average in the next row for all the months that are present