Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm facing an issue with a pivot table in Qlik Sense where the expansion state of one of my dimensions changes every time I reload the application.
Before
After:
In my pivot table, I have three dimensions in this order: Department (Departament), Division (Dzial), and Family (Rodzina). I want only the first two dimensions (Departament and Dzial) to be expanded, while keeping the third dimension (Rodzina) partly collapsed.
However, after reloading the app, the "Rodzina" dimension does not maintain its state. Some values under Family (like "WĘDLINY SAMOOOBSŁUGA") are expanded after reload, while others remain collapsed (NAPOJE), seemingly at random. The names in the "Family" dimension don’t change, but their expanded/collapsed states do.
Here’s what I’ve tried so far:
My code is simple:
ObrotyOgraniczoneDane:
Load
Data,
Year,
Week,
hid_sklep,
hid_segment,
sum(sprzedaz_ilosc) as sprzedaz_ilosc,
sum(obrot_brutto) as obrot_brutto,
DataDoPorownania,
RoznicaDni,
NrTygodnia_rokWczesniej,
Rok_rokWczesniej
From [lib://QlikContainers\Prod\Bagapol\1.QVD\3.Load\RaportTygodniowyBrefing\DaneZbiorcze.qvd]
(qvd)
Group By
Data,
Year,
Week,
hid_sklep,
hid_segment,
DataDoPorownania,
RoznicaDni,
NrTygodnia_rokWczesniej,
Rok_rokWczesniej
;
Segmenty:
Load Distinct
hid_segment,
kod_departament,
nazwa_departament,
kod_departament&' '&nazwa_departament as Departament,
kod_dzial,
nazwa_dzial,
kod_dzial&' '&nazwa_dzial as Dzial,
kod_rodzina,
nazwa_rodzina,
kod_rodzina&' '&nazwa_rodzina as Rodzina
From [lib://QlikContainers\Prod\Bagapol\1.QVD\3.Load\RaportTygodniowyBrefing\DaneZbiorcze.qvd]
(qvd);
And table to:
And "Yes" i remeber keep the changes states saved:
This is the first pivot table with 3 dimensions, I often have only 2 dimensions fully expanded.
I search for similar topics, but only i found is this:
QlikView: Bookmark returns different expand-collapse layout of pivot tables after reload -> I dont understand the solution.
Hi Sebastion,
This can be very tricky indeed and as mentioned in the link you provided as the load order determines actually what is expanded and what is not and there can be hundreds of very different issues with it.
I would not consider saving it with the state and would think about different solution!!! - Note that in some near future you may need to be forced to swap the pivot table oject to new pivot table object and solution you are currently working on may stop working.
You also mentioned NPrinting which is again completly different ball game and for NPrinting I would 100% not use pivot table Qlik Sense object as that is too limiting!!!
So the real question is:
Are you trying to save that state only for sake of using it in NPrinting?
cheers
Hi Sebastion,
This can be very tricky indeed and as mentioned in the link you provided as the load order determines actually what is expanded and what is not and there can be hundreds of very different issues with it.
I would not consider saving it with the state and would think about different solution!!! - Note that in some near future you may need to be forced to swap the pivot table oject to new pivot table object and solution you are currently working on may stop working.
You also mentioned NPrinting which is again completly different ball game and for NPrinting I would 100% not use pivot table Qlik Sense object as that is too limiting!!!
So the real question is:
Are you trying to save that state only for sake of using it in NPrinting?
cheers
Thanks for the answer @Lech_Miszkiewicz
I don't want to be too demanding, but it seems to me that it should simply work... in the sense that problem is "it doesn't work and should be". I hope It will be somehow fixed by people from Qlik in some newer version.
As for the solution provided in the link, I understand that first I have to load the Department separately, then the Department separately and the Family separately?
New solution?
I was thinking of adding the selected Rodzina to the script and making a full expansion.
And as for Nprinting 🙂
Yes, I remember your lessons on creating a pivot table in Qlik Nprinting and why it is recommended this way (and in most reports it is used this way).
But:
- the user wants what is in this table as it is and that is enough for him,
- the sheet shows the data per week (and create 44+ sheets now), so it is enough for me to create one sheet in Qlik Nprinting, add Week level and it is ready [and I admit that I don't know how to do it "correctly", I tried and failed]
As far as Nprinting goes I would have flatten the table to straight table and control what is „expanded” and what is not by creating an equivalent of that pivot layout by creating single grouping dimension with indentations (same as you would do for P&L)
cheers
ps. We can chat about it if you like, just let me know