Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
sum({<Y=,Monthnum=>}Sales)/Count( DISTINCT Monthnum)
when i am trying calculate it is not giving avg
here Count( DISTINCT Monthnum) is 06
if i give manually 06 then it is giving avg if i write Count( DISTINCT Monthnum) its not giving avg
its giving only sum(sales)
what is the mistake here ?
it most likely related with the fact that you are ignoring the MonthNum in you first set analysis,trying creating this in a variable
Is Monthnum a correct field name? What if you try this in a text box:
Count( DISTINCT Monthnum)
hi COMMONQLIK
cAN YOU SHARE YOUR SAMPLE FILE?
Hi,
If sum({<Y=,Monthnum=>}Sales)/Count( DISTINCT Monthnum) gives you sum({<Y=,Monthnum=>}Sales) its because Count( DISTINCT Monthnum) = 1.
If Count( DISTINCT Monthnum)=1 its because you have only one monthnum.
Have you selected a month ?
Is Monthnum the correct field ?
Maybe have you forgotten the set analysis in the second aggregation. Try this :
sum({<Y=,Monthnum=>}Sales)/Count({<Y=,Monthnum=>}DISTINCT Monthnum)