In one of my dashboards, user asked me to create a pivot table that displays assets for top 10 dimension values and everything else grouped and displayed under 'Other'. So, at most the pivot table will have 11 values displayed in the dimension. This requirement can easily be achieved by creating calculated dimension using aggr () and rank () function as explained in my earlier post.
However, the tricky part was the custom sorting requirement. The dimension values need to be sorted in alphabetical ascending order but 'Others' should to be the last value.
After trying several work arounds, I solved custom sorting requirement using match () function. Under Sort tab in chart properties, selected Expression and used following expression:
However, the tricky part was the custom sorting requirement. The dimension values need to be sorted in alphabetical ascending order but 'Others' should to be the last value.
After trying several work arounds, I solved custom sorting requirement using match () function. Under Sort tab in chart properties, selected Expression and used following expression:
Match (aggr (if (rank(sum (Assets))<=10, Currency,'Others'), Currency),'1','2','3','4','5','6','7','8','9','10','Others')
I also selected Text A -> Z.
As you may know, Match() takes input string (aggr() expression in this case) and range of values. It returns the position of the input string in the range values. If the string is not found, it returns 0. In this scenario, it simply returns 11 for 'Others' and 0 for everything else.
This made 'Others' to be sorted as last value (11th position) and everything else is sorted in alphabetical order.
Custom sorting in Qlikview can also be achieved by creating an inline table with 2 columns, containing dimension value (same name as actual dimension column) and sort order ( numeric column with sort order numbers). Qlikview associates dimension column with actual dimension in the data model. While sorting in UI, we can select expression and use the sort order column from the inline table for custom sort order.
But , this was a different case as the dimension values are constantly changing and too many dimensions to code the inline table.
Feel free to comment if you know any other alternative or better solutions
Hello Krishnamurthy,
ReplyDeleteits a good thought, my other approach would be
=aggr(if(rank(sum(Sales))<=10,rank(Country),11),Country)
Srinivas Chitrapu
Thanks Sreenivas.
ReplyDeleteI think there is a need to provide some more information about Qlik and its other aspects.It is the best tool for solving some very complex IT problems.
ReplyDeleteQlik Rest Api Connection
insaicu_e Joshua Jefferson https://wakelet.com/wake/bDOxCLjmbR8roDhtlSuPc
ReplyDeleteinrisleuti
SMM PANEL
ReplyDeleteSmm panel
iş ilanları
İnstagram takipçi satın al
Hirdavatci
https://www.beyazesyateknikservisi.com.tr
servis
Tiktok Para Hilesi
beykoz vestel klima servisi
ReplyDeleteüsküdar vestel klima servisi
beykoz bosch klima servisi
üsküdar bosch klima servisi
beykoz arçelik klima servisi
ataşehir samsung klima servisi
çekmeköy mitsubishi klima servisi
ataşehir mitsubishi klima servisi
maltepe vestel klima servisi
Good content. You write beautiful things.
ReplyDeletevbet
hacklink
sportsbet
mrbahis
hacklink
mrbahis
vbet
taksi
korsan taksi
Success Write content success. Thanks.
ReplyDeletebetpark
deneme bonusu
canlı poker siteleri
canlı slot siteleri
betmatik
kıbrıs bahis siteleri
betturkey
kocaeli
ReplyDeletekonya
kuşadası
kütahya
malatya
2YAAT
başakşehir
ReplyDeletebeykoz
gölcük
kütahya
bandırma
FB7AK8
ısparta
ReplyDeletetunceli
ağrı
ığdır
samsun
VB7BY
شركة تسليك مجاري بالاحساء yd9tRDrc8Y
ReplyDelete