Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to restrict the specific values in an expression from Pivot table

Hi,

I created a pivot table having an KPI NI Amt, which is having the values of 0,1,2,3,11,14,.........3000.

I want to restrict the values from 0 to 11 in that expression.NI AMt=sum(Ni Amt).Please find the  attached  qvw.

NI1.PNG NI2.PNG

Thanks,

Krishna

9 Replies
vishsaggi
Champion III
Champion III

Try this in your expr:

[Ni Amt]

= IF(Sum([NI Amt]) > 11, sum([NI Amt]))

sunny_talwar

So only those NI Amt should be added which are between 0 and 11?

Anonymous
Not applicable
Author

i think there are two ways to same -

1, at UI level -

if(Aggr(Sum([NI Amt]),<Dimension in >) >11, Sum([NI Amt])

2. In Script - Create a Separate Table for this KPI agianst group by <dimension in chart> sum ([NI Amt]) and then can create flag for < 11 upon it and can use it in UI expression and exclude that Flag.

Hope this will work for you

Not applicable
Author

Yes Sunny.

Ex:The Nt Amt Values for ID=28169 are 0 and 11.

I dont want to see the value 11 and also the corresponding ID 28169 in the chart.

vishsaggi
Champion III
Champion III

Did you try my above expr?

Not applicable
Author

This is working but, i am able to see Null values in the expression and corresponding dimension values are appearing in the chart.

Before the logic applies:

NT6.PNG

After applying the logic.

NT5.PNG

Anonymous
Not applicable
Author

you can also referer to the expression itself... leads to an expression error but works

if([NI Amt]>11,[NI Amt])

Not applicable
Author

Logic 1 is working, but still i can see null values and corresponding dimension are appearing in the chart.

NT6.PNG

NT5.PNG

vishsaggi
Champion III
Champion III

Is your Field Total Penalty a dimension or an expression ?If it is an expression try to drag and move the expression field Net Incurred Amount before your Total Penalty field?