Qlik Community

Qlik Sense Cloud Discussions

Highlighted
rgreben
New Contributor III

Ranking Toggle

Hello Group!

I have the formula below which allows me to see bottom individual customer names based on sales growth (negative growth in this case) for product xxx.  The number of bottom accounts is controlled by a cyclic expression. I would like to add a toggle which will allow me to switch between individual customer name and IDN, and I can use a cyclic dimension for that. Cyclic dimension 1 = IDN, 2 = individual customer name. I thought I could simply replace [Individual Customer Name] below with if cyclic dimension =1 then IDN otherwise individual customer name. This doesn't seem to be working. Any help would be greatly appreciated.

Thank you.

=
IF(
AGGR(
RANK(
-
(
SUM({$<
[Fiscal Month]=,
[Fiscal Year]=,
[Fiscal Quarter]=,
[Fiscal MonthYear]=,
[Calendar.Date]=,
[Minor SubCategory] = {'xxx'},
[Fiscal Year]={"$(=max([Fiscal Year]))"},
[Fiscal Month Number] = {"<$(=max({<[Fiscal Year]={$(=max([Fiscal Year]))}>} [Fiscal Month Number]))"}
//[Nth Day of Fiscal Quarter]={"=$(=maxstring([Fiscal QuarterYear])) [Nth Day of Fiscal Quarter]))"}
>}NetSales
)
-
SUM({<
[Fiscal Month]=,
[Fiscal Year]=,
[Fiscal Quarter]=,
[Fiscal MonthYear]=,
[Calendar.Date]=,
[Minor SubCategory] = {'xxx'},
[Fiscal Year]={"$(=max([Fiscal Year])-1)"},
[Fiscal Month Number] = {"<$(=max({<[Fiscal Year]={$(=max([Fiscal Year]))}>} [Fiscal Month Number]))"}
>}NetSales
)
)
) <= $(cyclic expression)
,[Individual Customer Name]
)
,[Individual Customer Name]
)

1 Reply
rgreben
New Contributor III

Re: Ranking Toggle

Haven't gotten any responses to my post. Any recommendations on how to fix this formula would be greatly appreciated.