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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
praveenpurush6
Contributor III
Contributor III

Get the count of [Week No] only for maximum [Week No] using Expression formula.

Hi,
I am very new to qlikview but am good excel functions. Here I want to get the

1) count of [Week No] only for maximum [Week No]!

       example

     - the maximum number is 18 and the count is 3. if its 17 the count is 2. for 16 also its 2.

2) Also the total count of G,R,Y for a particular maximum week number.

     - For example 18,G is 3,R is 0 and Y is 0.

          17 - G is 1,R is 1 ,Y is 0

          16 - G is 0,R is 1 ,Y is 1

q1.JPG

I need to use this expression formula of a Text Box.

Thanks.

2 Replies
sunny_talwar

May be this

1) Count({<[Week No] = {"$(=Max([Week No]))"}>} [Week No])

2) Same expression as above

Count({<[Week No] = {"$(=Max([Week No]))"}>} [Week No])

but use Activity A as your dimension

praveenpurush6
Contributor III
Contributor III
Author

Hi Sunny,

Thanks a ton. First formula worked fine...The Second one I made changes referring the other threads and arrived on the below.

=Count({<[Week no] = {"$(=Max([Week no]))"},[Activity A]={'R'}>} [Activity A])

=Count({<[Week no] = {"$(=Max([Week no]))"},[Activity A]={'G'}>} [Activity A])

=Count({<[Week no] = {"$(=Max([Week no]))"},[Activity A]={'Y'}>} [Activity A])

Praveen..