Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
dafnis14
Specialist
Specialist

Error in calculated dimension for a dynamic bucket

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!

Labels (5)
1 Reply
dafnis14
Specialist
Specialist
Author

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),

'<='& vLimit1,
'<=:'&vLimit2,
'<=:'&vLimit3,
'<=:'&vLimit4)

Thank you Oleg!