Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I get nested IF´s and minimum value

Hi, everybody, I have this Expression problem:

I need that

if VENTAS is less than 50% then my ABC VENTA column is "AA"

if VENTAS is greater than 50% my ABC VENTA Column is "A"

if VENTAS is grater than 80% my ABC VENTA Column is "B"

If VENTAS is greater than 95% my ABC VENTA Column is "C"

I already made this condition, but the problem is that my customer is asking me that the first NO_PARTE allways must bee "AA" but if my first "NO_PARTE" is greater than 50% my ABC Column wont be "AA"

I pasted an example of this and I attached the APP.

Please I really need your help!

Thanks!!

Picture1.jpgPicture2.png

16 Replies
Not applicable
Author

Hi swuehl, I thought It was gonna be general but with the consistent for ABC VENTA, so, then is this possible? getting this table with consistent ABC VENTA?

swuehl
MVP
MVP

Your definition for a AA rating of ABC Venta looks like this, right?

if(RangeSum(Above(SUM({$<AGRUPADOR={'01_VENTAS'}>}(DATA_AVER))/SUM({$<AGRUPADOR={'01_VENTAS'}>}total DATA_AVER) , 0, NoOfRows()))<=0.50,'AA')

I think the rangesum(above(...)) part is problematic, since it is depending on sort order. But maybe I just understand your rating. Could you explain what ABC Venta should tell us? How can I read it?

swuehl
MVP
MVP

Ok, I think I understand, you want to show a kind of pareto chart. I missed the full accumulation and the sort expression in the ABC_VENTA expression. So I think I understand why you need the rangesum, but still, this doesn't give me a clue how to handle your CONTADOR chart, since I can't influence the sorting of the aggr() dimensions I need to reproduce the ABC_VENTA in that chart as dimension.

Not applicable
Author

Sure,

If the field "Ventas" is less or equal than 50% then will be "AA", also if the condition is not met the first row will automaticlly be "AA"

if the field "Ventas" is greater or equal than 50% then will be "A"

If the field "Ventas" is greater or equal than 80% then will be "B"

if tue field "Ventas" is greater or equal than 95% then will be "C"

the more lower % the more profit we will get.

Not applicable
Author

Did you find out the way to solve it?

swuehl
MVP
MVP

Sorry, I haven't.

Maybe you want to post a new thread with this requirement, so more forum members might have a look at it.

Regards,

Stefan

Not applicable
Author

Ok, that wuold be worth it, I appreciate your help, you helped me really much.

Thanks and have a nice one!!