Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i tried .....
sum({<Year={2010,2011,2012}>}Sales)
/
Count({<Year={2010,2011,2012}>}Sales)
is there any other way to find averag
I think average can be very tricky and you might want to look here for why....
You can do this
Avg({<Year={2010,2011,2012}>}Sales)
Or this
Sum({<Year={2010,2011,2012}>}Sales)
/
Count(DISTINCT {<Year={2010,2011,2012}>} Trans_ID)
Hi,
I am getting different answer by both ways:-
but naswer should be the same
;-
NOte:- Dimension------Year(2009,2010,2011,2012)
Measure:--------Sales(Sum)
Like I mentioned.... Average can be tricky... do you or your users agree with one of the two ways the average is getting calculated?
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others
Sum({<Year={2010,2011,2012}>}Sales)/Count(DISTINCT{<Year={2010,2011,2012}>}Year)
Today I tried to formula ,I got same output for both for finding average of last three years(2010,2011,2012)
In my graph ,
Dimension- year(2010,2011,2012)
Measure ----Sum(Sales)
Here I have attached two screen shots ..in which by both ways I got same output for the average sales of last three years
Expressions:-
Avg({<Year={2010,2011,2012}>}Sales)
or
Sum({<Year={2010,2011,2012}>}Sales) / Count( {<Year={2010,2011,2012}>} Sales)