Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Navars
Creator
Creator

need to assign points based on percentage

Hello All,

i have attached a file where i want to assign points based on the percentage, but problem here is when percentage=0 then i need to check the other values within SNR wise if all other values within that SNR are greater than 5 then assign point as 1, if atleast one value is lessthan 5 then assign point as 0.

if percentage is more than 0 then we need to follow below condition

if([percentage]>0 and [percentage]<=5, 0,
if([percentage]>5 and [percentage]<=10,-1,
if([percentage]>10 and [percentage]<=20,-2,
if([percentage]>20,-3)

attached expected result as well.

Thanks in advance.

 

 
1 Solution

Accepted Solutions
10 Replies
sunny_talwar

Try this

If([percentage] = 0, If(Min(TOTAL <SNR> Aggr(1-(KPI_Value/Max(TOTAL <SNR> KPI_Value)), SNR, KEY), 2) < 0.05, 0, 1),
If([percentage] <= 5, 0,
If([percentage] <= 10, -1,
If([percentage] <= 20, -2,
If([percentage] > 20, -3)
))))
Navars
Creator
Creator
Author

Thanks a lot, sunny it's working...

I need one more step to complete the whole thing, I have to sum up the points based on KEY and i need to display max sum value and its corresponding records.

 

Thanks in Advance.

Sravan  

sunny_talwar

Is this what you looking to get?

image.png

Navars
Creator
Creator
Author

Hi Sunny, Yes but not completely correct. we need to sum up the points based on KEY and we need to display the KEY which as max points. along with KEY we need to display corresponding SNR , KPI_Value as well I attached the screen shot for reference what i am exactly expecting .
Navars
Creator
Creator
Author

Hi Sunny, Yes but not completely correct. we need to sum up the points based on KEY and we need to display the KEY which as max points. along with KEY we need to display corresponding SNR , KPI_Value as well I attached the screen shot for reference what i am exactly expecting .
sunny_talwar

This?

Capture.png

Navars
Creator
Creator
Author

Thank you so much.

yes that is my expected result.

Navars
Creator
Creator
Author

Hi Sunny on sample data its working, the same expressions I implemented on my original application it's not giving the expected result, it's showing all the records not filtering the data (KEY which has max no of points )

Thanks

Sravan

sunny_talwar

Would you be able to share a sample where we can see the issue?