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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Count Function


Hi all,

I have a requirement where we need to calculate a value like  (sales/ No of months lapsed).

Ex: if we will select a year 2013 and month='July' then it should calculate the value like sales/6.

So any body can suggest how to calculate the no of months lapsed .

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

By using month(date#(MONTH FILELD ,'MMM')) it worked.

Thanks all for ur help.

View solution in original post

17 Replies
anbu1984
Master III
Master III

Sales/Num(GetFieldSelection(MonthField))

Anonymous
Not applicable
Author

its not working...we need the number of that month selection.

By using num function its not coming.

MK_QSL
MVP
MVP

SUM(Sales)/NUM(Max(Month)-1)

Anonymous
Not applicable
Author

not working

its_anandrjs
Champion III
Champion III

Try with this

Sum(Sales) / Max(Month)-1

Or if possible share the sample file.

PrashantSangle

Hi,

Try This,

SUM(Sales)/NUM(Max(Month))-1


Just wanted to know how you calculating Month?

Regards,


Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
antoniotiman
Master III
Master III

Hi,

Your Field Month is ='July' or =7 ?

Not applicable
Author

You can try this :=sum(Sales)/(num(Month)-1).

=num(Month) will give you the int related to the month selected.

Anonymous
Not applicable
Author

Field month is July,but i need the number 7.