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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
subbareddykm
Creator II
Creator II

Count Need in Text Box

Hi Using below data I need count of ID which are having >5000 by Monthwise in text box  using aggregation functions But not >sales.

LOAD * INLINE [

   

    ID, Month, Sales

    1, Jan, 2347

    2, Feb, 3274

    3, Mar, 388

    4, Jan, 32476

    5, Feb, 37781

    6, Mar, 53782

    7, Jan, 23857

    8, Feb, 326

    9, Mar, 5673

    10, Jan, 46811

    11, Feb, 9621

    12, Mar, 74635

    13, Jan, 83527

    14, Feb, 62729

    15, Mar, 39

    16, Jan, 255

    17, Feb, 342

    18, Mar, 66739

];

9 Replies
subbareddykm
Creator II
Creator II
Author

OutPut Is :

 

Jan4
Feb3
Mar4
sunny_talwar

May be this as your expression

Count(DISTINCT {<ID = {"=Sum(Sales) > 5000"}>} ID)

sunny_talwar

Sample attached

Capture.PNG

subbareddykm
Creator II
Creator II
Author

Thankq sunny For ur reply,

But In my scenario  , where i have three exp

Like

If(

(Sum({<Month1={'Jan'}>}Sales1)+

Sum({<Month2={'Jan'}>}Sales2)+

Sum({<Month3={'Jan'}>}Sales3)) >5000,Count(Distinct ID)




This is not Worling 😞


What should i write here in my case

sunny_talwar

What is Month1, Month2, Month3 here?

subbareddykm
Creator II
Creator II
Author

Each Amouunt is having diff months

actually i have date date fields instead of that i m showing Month

sunny_talwar

It would be better if you provide data which is more aligned to your actual data

subbareddykm
Creator II
Creator II
Author

Sunny i have one more query

If i want take some range  from 5000 to 50000 for below expression,How to write this :

Count(DISTINCT {<ID = {"=Sum(Sales) > 5000"}>} ID)



Can any one help me on this

sunny_talwar

May be this

Count(DISTINCT {<ID = {"=Sum(Sales) > 5000 and Sum(Sales) < 50000"}>} ID)