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: 
Not applicable

Counting number of rows of a table based on a condition and displaying on a text object

Hi,

I have a straight table with one dimension and 2 expressions. So, basically, there are 3 columns in the straight table. I want to count the number of rows of this straight table, where the value of the 2nd expression is greater than 0 and display the same in a text object.

For eg: if there are 100 rows in the straight table and only 50 of them has a greater than 0 value in the 2nd expression, I want a text object to show it as 50.

Request help to achieve this.

Thanks Much,

Tutan

7 Replies
Not applicable
Author

Use Aggr function and check

soething similar as given below

 

sum

(aggr(if(Date(LOAD_DATE) >= Date(From_Date) and Date(LOAD_DATE) <= Date(To_Date), Sum(IMPACTED_NET_CREDITABLE_AMT)),Fact_Typ,BUSINESS_UNIT))

Date(LOAD_DATE) >= Date(From_Date) and Date(LOAD_DATE) <= Date(To_Date),  --- this is my condition..similarly you can put your condition to check the >50

Fact_Typ,BUSINESS_UNIT are my dimensions

Not applicable
Author

Hi,

Please find the attached file Hope it helps you

Not applicable
Author

Hi,

Please try this expression in the second expression column

=Count({<sales={">0"}>}TOTAL SKU_ID)

Sokkorn
Master
Master

Hi Tutan,

Can you share your second expression here?

Regards,

Sokkorn

Not applicable
Author

Hi Sokkorn,

Here is my expression which I am using:

num($(vInv_Turn_YTD_TS),'#,##0.00')-num($(vInv_Turn_PY_YTD_TS),'#,##0.00')

Sokkorn
Master
Master

Hi Tutan,

I noticed that you have use variable in your expression. Can you help to post your variable definition? So that we can figure it out together.

Regards,

Sokkorn

Sokkorn
Master
Master

Or possible attached your sample app here.