Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to sort by expression. My dimensions are Item.Full Name, Item.Sales description, and Item.Preferred Vendor Full Name.
The expressions calculate Qty. on Hand, 1 shows the Reorder Point and 1 shows the Build Point (depending on the Item Type) and then I have a column for the avg usage.
I created a sort by expression that sorts the first dimension Item.Full Name
If([Item.Reorder Point]<=[Item.Quantity On Hand],1,If([Item.Build Point]<=[Item.Quantity On Hand],2,If(IsNull([Item.Reorder Point] or [Item.Build Point]),3)))
The idea is to show the items that are low first (the Qty. on Hand value turns red if < or = to the reorder or build point, whichever applies) and then to show the rest with the Qty. on Hand value in green.
However, when I scroll through, it starts out perfect, all red, but then I see a whole bunch of green and red quantities interspersed throughout the table. Can't discern why. According to the table, the Qty. on Hand is clearly more than the reorder or build point and items lower down, the QOH is = or < the reorder or build point.
Let me know if you need more clarity.
Thanks!
One thing I see tht is wrong with your expression:
If([Item.Reorder Point]<=[Item.Quantity On Hand],1,If([Item.Build Point]<=[Item.Quantity On Hand],2,If(IsNull([Item.Reorder Point]) or isnull([Item.Build Point])),3)))
Thanks for pointing that out. I had fixed it but am still not getting the result I want.
This is what I have now If([Item.Reorder Point]<=[Item.Quantity On Hand],1,If([Item.Build Point]<=[Item.Quantity On Hand],2,If(IsNull([Item.Reorder Point] or [Item.Build Point]),3)))
This is a duplicate thread, please see the original thread that has further comments:
https://community.qlik.com/t5/New-to-QlikView/Sort-by-Expression/m-p/1609971/highlight/false#M378943
Regards,
Brett