Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to define a calculated dimension based on the solution offer here by @effinty2112 :
https://community.qlik.com/t5/New-to-QlikView/Dynamic-bucket/td-p/1435684
The limit of each bucked ise dynamic.
My expression works fine in a text box, but generates an error when I try to use it for a calculated dimension.
Any idea why?
=Pick(Match(-1,
sum(SalesOrder_Line_Part_Qty) < vLimit1,sum(SalesOrder_Line_Part_Qty) < vLimit2,sum(SalesOrder_Line_Part_Qty) < vLimit3,sum(SalesOrder_Line_Part_Qty) < vLimit4,-1),
'<='& vLimit1,'<=:'&vLimit2,'<=:'&vLimit3,'<=:'&vLimit4)
Thanks in Advance!
I got an idea from a solution offered by @Oleg_Troyansky :
http://www.naturalsynergies.com/q-tip-14-aggr-and-synthetic-dimensions/
So I've modified the expression to include AGGR() :
=Pick(Match(-1,aggr(sum(SalesOrder_Line_Part_Qty),SalesOrder_Line_PartID) <= vLimit1,aggr(sum(SalesOrder_Line_Part_Qty),SalesOrder_Line_PartID) <= vLimit2,aggr(sum(SalesOrder_Line_Part_Qty),SalesOrder_Line_PartID) <= vLimit3,aggr(sum(SalesOrder_Line_Part_Qty),SalesOrder_Line_PartID) <= vLimit4,-1),
Thank you Oleg!