Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Filter data based on expression

Hi All,

I am trying to filter out records on changing one slider based on an expression results. I have shown in a table, a column that has accumulated percentage (sorted on a ranked column). What I want is to filter out the records based on this accumulated percentage column after the selected (on slider) value is covered in this column.

I am sorry for unable to explain the situation the best, however I have created an example of what is required. Please see attached document. 

regards,

Salman

1 Solution

Accepted Solutions
Not applicable

Re: Filter data based on expression

Hi,

I was able to get required results by:

1-     Sorting data source on Direct Cost field.

2-     Adding a trigger on variable change and in trigger, select in Discharge Id field the following expression:

'('&concat(Aggr(if(rangesum (above(sum([Direct Cost]),1,RowNo()-1))/sum({$<[Discharge Id]=>}Total [Direct Cost])<v_x_percent_cost_driver,[Discharge Id]),[Discharge Id]),'|')  &')'

regards,

Salman

4 Replies
Not applicable

Re: Filter data based on expression

Attached with answer. You can use a calculated dimension.

Hope it helps.

Thanks

Not applicable

Re: Filter data based on expression

Hi Ajay,

Thank you for the quick response. This is really helpful though it didn't serve the purpose. I am using that table on the right just to show the complete dataset being used in analysis however the goal is to use the filtered data in the chart in the middle.

Not applicable

Re: Filter data based on expression

Oh ok i didn't know you wanted it in the Bar chart. In that case

The calculated dimension you already have put that in the back-end and create a new field say - TestField

Then use the expression you already have in the chart expression for filtering out the data.

Thanks

Not applicable

Re: Filter data based on expression

Hi,

I was able to get required results by:

1-     Sorting data source on Direct Cost field.

2-     Adding a trigger on variable change and in trigger, select in Discharge Id field the following expression:

'('&concat(Aggr(if(rangesum (above(sum([Direct Cost]),1,RowNo()-1))/sum({$<[Discharge Id]=>}Total [Direct Cost])<v_x_percent_cost_driver,[Discharge Id]),[Discharge Id]),'|')  &')'

regards,

Salman

Community Browser