Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to achieve a complex set analysis in Qlikview.
Aim:
To fetch the second highest sales of an outlet for a particular product where the ranking is done on the complete set excluding the currently selected outlet ({Super Set} - {Current Selection}).
Challenge:
The ranking needs to be done on the latest quarter and not on the aggregation of all and I am trying to pass the quarter value via a variable. Since the position where the variable is to be passed as value is in the second depth within the set analysis, the code fails.
Code:
=SUM(
{1<[Product Brand]={'Product1'},
[Outlet]= {"=RANK(SUM({<[Product Brand]={'Product1'},
[Outlet]=e([Outlet]),
[Quarter]={"$(=$(AccMaxQuarter))"}
>}
[Sales]))=1"}
>}
[Sales])
where:
AccMaxQuarter is the variable containing the latest quarter
If I replace the variable with hard-coded constant, it works.The variable itself is correctly initialized and contains the accurate value.
Maybe you used the variable without $-sign expansion like:
{"$(AccMaxQuarter)"} or
{"AccMaxQuarter"}
- Marcus
What expression are you using for AccMaxQuarter?
Maybe you used the variable without $-sign expansion like:
{"$(AccMaxQuarter)"} or
{"AccMaxQuarter"}
- Marcus