Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Heena
Contributor III
Contributor III

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.

 

1 Solution

Accepted Solutions
kaanerisen
Creator III
Creator III

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..

 

View solution in original post

3 Replies
Channa
Specialist III
Specialist III

add rownum() to script or table

Channa
kaanerisen
Creator III
Creator III

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..

 

Heena
Contributor III
Contributor III
Author

Thanks!!