Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Page 355
I am measuring load factor, ie number of passengers in plane vs seats in plane. In my table its often > 100, which is impossible. Moreover, my table does not even look like the one in the book. Where could I be making mistakes ?
My stuff -
Book -
Hi John Wayne,
Regarding the aspect of the tables one big difference is that the one in the book has some columns pivoted (Year and Month) while yours doesn't
In QlikView, pivoting is done by dragging and dropping with the mouse. Just point the mouse somewhere in the
field, click and drag it to the desired position. While a field is being moved, its borders
are highlighted in blue.
Before doing this please check the Allow Pivoting check box in the Chart Properties: Presentation. It needs to be checked for the pivoting to work.
Regarding the numbers, if you upload the qvw file I could have a look and try to explain the differences.
Regards
Carlos
Can u share your qvw file.
Hi John Wayne,
Regarding the aspect of the tables one big difference is that the one in the book has some columns pivoted (Year and Month) while yours doesn't
In QlikView, pivoting is done by dragging and dropping with the mouse. Just point the mouse somewhere in the
field, click and drag it to the desired position. While a field is being moved, its borders
are highlighted in blue.
Before doing this please check the Allow Pivoting check box in the Chart Properties: Presentation. It needs to be checked for the pivoting to work.
Regarding the numbers, if you upload the qvw file I could have a look and try to explain the differences.
Regards
Carlos
One difference is that you haven't pivotted your Year and Month dimension to the top (just by drag & drop), as described on top of page 356.
The other issue is hard to guess without knowing your setting (expressions, chart settings, data you've used).
You can download the sample solution .qvw files from PacktPub site and compare with your file.
@Carlos Fernández . Thanks ! So, I still have a lot to learn. I attached a copy of my qlikview file. Can you please help me to find the error ?
Hi John,
The problem was that the expression used to calculate the variable eLoadFactor was the wrong one. Instead of Sum([# Departures Performed]) / Sum([# Departures Scheduled])) it should be Sum([# Transported Passangers]) / Sum [# Available Seats])), Changing this in the variable overview and pivoting also the Year dimension you get the expected table.
Regards
Carlos
Thank you very much ! The variable should be = (Sum([# Transported Passengers]) / Sum ([# Available Seats]))
Btw, how do I remove those pivoted columns and go back to the original "look" (ie first pic in my question) ? Also,
the text in cells is black. So, I cannot clearly see the text in blue cells. How do I make it white ?
You can get the original table in the same way that you did for pivoting but the other way around. That is, point the mouse somewhere in the
field, click and drag it to the desired position. While a field is being moved, its borders
are highlighted in blue. It can be a bit tricky the first couple of times before you get used. Of course the Allow Pivoting check box in the Chart Properties: Presentation needs to be checked for the pivoting to work.
To change the color of the text in some cells you should put an expression similar to the one you have used to change the background color but this time in the text color section under the expression.