Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Highlighted
Heena
Not applicable

how to fetch the count of rows, of the table chart in KPI chart based on dynamic variable value

Hi,

I have a table having fields -Test Name,Selection Priority,Rank,Duration and cumulative total, based on the slider variable values(Dynamic), the table should show the cumulative total.

for example: i have set the slider variable value to 213, the table should show me the records having cumulative total less than 213.

but i have to show in the KPI chart, the count of rows in the table,for slider variable value to 213.. the count of rows is 1057.

Can any one please give me the expression to use in the KPI chart? to fetch count of rows in the table based on dynamic value of slider variable.

for ex: i set the slider variable value to 89, the count of rows KPI should show me the count of rows in the table.

Count_Rows.JPG

 Thanks in Advance!

Attached is the QVF.

 

2 Replies
Channa
Not applicable

Re: how to fetch the count of rows, of the table chart in KPI chart based on dynamic variable value

add rownum() to script or table

Channa
kaanerisen
Not applicable

Re: how to fetch the count of rows, of the table chart in KPI chart based on dynamic variable value

Hi Heena,

You should use set analysis in your expression.

Cumulative Total Expression in table (If it doesn't exist in your data set):

max(aggr(if(RangeSum(Above(TOTAL (Duration), 0, RowNo(TOTAL))) <= $(v_Days),
RangeSum(Above(TOTAL (Duration), 0, RowNo(TOTAL)))
),[Test Name]))

Count Of Row Expression on KPI:

Count({<[Test Name]={"=max(aggr(if(RangeSum(Above(TOTAL (Duration), 0, RowNo(TOTAL))) <= $(v_Days),RangeSum(Above(TOTAL (Duration), 0, RowNo(TOTAL)))),[Test Name]))<$(v_Days)"}>}"Test Name")

 

Untitled.pngUntitled2.pngYou can check attached qvf.

Hope it helps..