You are on page 1of 31

Getting Started with QlikView

Working with KPI, Variables and Expression Lab#11

es!ription" BISP is committed to provide BEST learning material to the beginners and advance learners. In the same series, we have prepared a complete end-to end Hands-on Beginners G ide !or "li#view $eport, %ashboard and %ata &odels. The doc ment !oc ses on designing 'PIs, (ariables and E)pression. *oin o r pro!essional training program and learn !rom e)perts.

Histor+, (ersion /.0 1/01 /.0

%escription -hange Initial %ra!t $eview20

. thor S rbhi Sah $a3# mar 4+alamad g la

P blish %ate 10st . g 15th . g 1/01

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 0

Table of Contents
Table o! -ontents......................................................................................................................... 1 .dd an action6lin#ing7 to a te)t ob3ect,......................................................................................... 8 Implement pie chart ,................................................................................................................... 9 'PI &ar#et Share,...................................................................................................................... 5 (ariables,.................................................................................................................................... 08 E)pression :verview window, ................................................................................................... 0; .trib te !or $eport ser,............................................................................................................. 1/ $eport sers............................................................................................................................ 1/ Straight Table, ........................................................................................................................ 1/ . straight table can contain both dimensions and e)pressions, Straight table also implemented with the report sers. ....................................................................................... 1/ Be!ore creating the straight table we re< ire the gro p which we will implement within the table........................................................................................................................................ 1/ 4ow we are going to create gro p, go to Setting -= %oc ment Properties.............................1/ ................................................................................................................................................ 1/ ............................................................................................................................................... 10 ................................................................................................................................................... 80

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 1

Add an action(linking) to a text object:


>e co ld se the te)tbo) ! nctionalit+ to allow !or < ic# navigation across the doc ment. ?or e)ample, a te)t ob3ect co ld be sed to switch to a detail sheet when a ser clic#s on it !rom a general-level dashboard. In the ne)t e)ample, we will assign an action that will open the .nal+sis sheet when a ser clic#s on one o! the te)t ob3ects, These are the steps which re< ired to Implement this !eat re........... Step 0, S ppose we have a te)t bo) and b+ clic#ing on it the corresponding chart sho ld appear which gives the in!ormation abo t carrier names !or top @ transported passengers.

>e want this !eat re on clic#ing on the te)t bo).

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 8

Step 1, 4avigate to dashboard sheet on which we will !ind the list bo) A-arrier nameB and the Te)t ob3ect ATransported passengers 6millions7B . $ename C $eplace the sheet I% o! .nal+sis sheet as ASH-anal+sisB. -op+ the sheet I% o! the .nal+sis sheet which is ASH-anal+sisB .

Step 8, 4ow come to the sheet dashboard were we have created o r te)t ob3ects ATransported passengers 6millions7B , right -lic# and navigate to the properties o! te)t ob3ect.

Step D, In Properties 4avigate to E.ctions tab and clic# on E.dd

Step @, .!ter clic#ing on the .dd b tton, a pop p window will open, select the EFa+o t option then -=.ctivate sheet-=o#

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page D

Step 9, 4ow it will as# !or the sheet I% so paste the sheet I% which were we have copied the I% o! the sheet .nal+sis -=.ppl+-=o#.

Step ;,4ow clic#ing on the te)t ob3ect on the dashboard sheet , it wo ld open the .nal+sis sheet.

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page @

This gives the in!ormation abo t top !ive carrier name on which more passengers travel.

Implement pie chart :


. pie chart 6or a circle graph7 is a circ lar chart divided into sectors, ill strating n merical proportion. In a pie chart, the arc length o! each sector 6conse< entl+ its central angle and area7, is proportional to the < antit+ it represents. This is a specialiGed graph sed in statistics. The independent variable is plotted aro nd a circle in either a cloc#wise direction or a co nter cloc#wise direction. The dependent variable 6 s all+ a percentage7 is rendered as an arc whose meas re is proportional to the magnit de o! the < antit+. Each arc is depicted b+ constr cting radial lines !rom its ends to the center o! the circle, creating a wedge-shaped Hslice.HThe independent variable can attain a !inite n mber o! discrete val es 6!or e)ample, !ive7. Below are the steps to be !ollowed to create the pie chart. Step 0, $ight clic# on the sheet-=4ew sheet ob3ect-=chart-= Select APie chartB-= 4e)t

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 9

Step 1, Inder the %imension tab, select A-arrier 4ameB !ield.

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page ;

-lic# .ppl+ = ?inish.

This pie chart does not show properl+ as it is displa+ing all the -arriers which is ver+ di!!ic lt to read or nderstand in this.

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page J

KPI Market

hare:

4ow we are moving toward o r ne)t 'PI which is mar#et share we have re< irement to calc late this !or the investment p rpose. Some time people invest their share in compan+ and the+ decide the partic lar compan+ on the basis o! the mar#et share. People interested on those compan+ which having highest share. So calc late the share according to the S m o! transported passengers. Step 0, 4avigate to the properties o! the Pie chart, nder the E%imension limit tab select A$estrict which val es are displa+ed sing the !irst e)pressionB -= then chec# Fargest 0/ val es

Step 1,Goto the E)pression tab then -=clic# to the add then give the label as A&ar#et shareB and the de!inition will be S m6K2TransportedPassengersL7

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 5

-hec# E$elative and the displa+ option E(al es on %ata Points -= .ppl+ Step 8,4ow the pie chart is created here with the Top 0/ -arriers in terms o! transported passengers.

Step D,In the pie chart i! we ta#e o r c rser on the section this will pop p the section. In this pie chart the top 0/ sections are shown and 8@.1DM observed b+ other which is seless i! we want that this other is not shown. I! we want to see all the carriers who have =0@M share relative to the total share then goto the %imension Fimits tab, chec# the option Show onl+ www.bispsol tions.com www.bisptrainigs.com www.h+periong r .com Page 0/

val es that are Greater Than or E< al to choose the 0@M this will show onl+ those carriers which having the percent 0@M o! the total pie chart then .ppl+-=o#

This will displa+ nothing beca se no carrier having the val e 0@M mar#et share when compared to the total mar#et share. So replace the val e with 0D.1 as we are having onl+ one carrier which has a mar#et share o! 0D.11 M = .ppl+ = ?inish.

This one is o r pie chart in which the highest share So thwest .irlines co. which is having the val e 0D.11M . Thats wh+ it showing in the pie chart. $est all carriers come nder the J@.;JM. Step @, In the 8rd option, i! we want to see all the carriers acc m lating to @/M o! the mar#et share 6select as shown below7 = .ppl+ = o#.

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 00

Step 9, 4ow the pie chart is created 6with @ carriers7 who contrib te @/M o! the mar#et share and the rest all are there in the D5.;; M.

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 01

!ariables:
. variable is a storage location and an associated s+mbolic name 6an identi!ier7 which contains some #nown or n#nown < antit+ or in!ormation, a val e. The variable name is the s al wa+ to re!erence the stored val eN this separation o! name and content allows the name to be sed independentl+ o! the e)act in!ormation it represents. S ppose we get repetition o! an+ e)pression again and again so once !eed the e)pression with the variable so the whole e)pression will replace b+ a single variable it will not go too length+. So to implement this we will go thro gh the Settings = (ariable :verview.

Then the tab will open which will as# !or the e)pression which +o wants to replace with the variable here, a bo) is available !or the comment as we are going to replace the e)pression !or the depart re per!orm so we have written the A%epart re per!ormB in the comments and the e)pression will introd ced in the de!inition bo), so !or adding the e)pression clic# on the de!inition bloc# 6O7 then the window will open which will as# +o !or the partic lar e)pression.

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 08

Then the window will open which as#s !or the name +o want to give to the variable.

4ow we have given the variable name as e epart#rePer$or% then add the de!inition here

>e have give the e)pression here is the S m62%epart re per!orm7.

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 0D

4ow as the variable is created, now we are going to replace the variable in place o! this e)pression. S ppose we want to replace the e)pression in the te)t bo) we have alread+ created in o r previo s session is %epart re per!orm here we have sed the e)pression As m62%epart re per!orm7B. Goto the properties o! te)t bo) A%epart res Per!ormedB-=e)pression tab -= variables

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 0@

E)plore the variables option here we get the variable Ae%epart reper!ormB =select P paste it >hile appl+ing the variable in the e)pression !ield these things sho ld #eep in mind. Enclosing the e)pression in parentheses, .s we want to ma#e s re that the e)pression alwa+s gets calc lated in the right order, we enclose it in parentheses., !or e)ample, we had an e)pression vE)ample containing 0/ Q @ witho t parentheses. I! we were to se that variable in an e)pression containing a !raction, !or e)ample, R6vE)ample7 C @, the wrong res lt wo ld be ret rned 600 instead o! 87. 4ot pre!i)ing the variable e)pression with an e< als sign, >hen the e)pression in a variable de!inition is pre!i)ed with an e< als sign 6S7, the variable gets calc lated globall+. In o r e)ample this wo ld mean that the Foad ?actor M val e is calc lated once !or the entire data model. >hen sed in a chart, all dimensions wo ld be ignored and the e)pression wo ld 3 st ret rn the same global val e !or each dimension. .s we obvio sl+ do not want this to happen, in this e)ample we do not pre!i) o r e)pression with an e< als sign. %ollar Sign E)pansion, Enclosing a variable 6or an e)pression7 between a dollar sign and parentheses 6%ollar Sign E)pansion7,tells "li#(iew to interpret the contents, instead o! 3 st displa+ing the contents ,when re!erencing variables, we sho ld E)pansion s+nta) in order !or them to be interpreted . se the %ollar Sign

The variable name begins with an e, This is !or administration p rposes mainl+. Having a consistent naming convention helps +o , as the developer, as well as an+ other thirdpart+, to easil+ identi!+ the p rpose o! an+ given variable. >e commonl+ se the !ollowing pre!i)es when naming variables, e(ariable4ame, >hen the p rpose o! the variable is to serve as an e)pression de!inition v(ariable4ame, >hen the p rpose o! the variable is to store a val e, whether static or calc lated

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 09

4ow the e)pression in the te)t bo) is here replaced with the variable and now its time to see that the te)t ob3ect retain same val e or not.

Here the te)t ob3ect displa+ the per!ect val e a!ter we have s ccess! ll+ replaced the e)pression with the variable.

"xpression #$er$ie% %indo%:


This is the window available in the men tab. , we can se the E)pression :verview window to !ind and replace e)pressions in a doc ment. Since beca se this is too di!!ic lt to go to each e)pression and replace the partic lar so here in e)pression tab we can get all the e)pression sim ltaneo sl+.

clic# on the e)pression :verview.............. .!ter clic#ing the E)pression :verview the window will open which will show all the e)pressions available in sheet C dashboard . www.bispsol tions.com www.bisptrainigs.com www.h+periong r .com Page 0;

now we have to replace the e)pression so clic# on the ?indC$eplace option.

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 0J

4ow the pop p window will open here we have to replace s m6K2Transported PassengerL7 $eplace with R6eEnplanedPassenger7 then $eplace .ll.

4ow see that all S m6K2TransportedPassengersL7 is replaced b+ R6eEnplanedPassenger7.....

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 05

Atrib&te for 'eport &ser:


'eport &sers
In "li#(iew, reports are considered to be more or less static displa+s o! in!ormation in a tab lar !orm. $eports can serve m ltiple p rposesN !or instance, the+ can be sed to provide sers at the operational level with the in!ormation the+ need in their dail+ activities. The+ can also be the end-point o! an anal+tical e)ercise. T+pical data vis aliGations at the report level are straight tables and pivot tables. 4ow we are going to create a table !or the report $eport. sers, create a new sheet and name as

traight Table:
. straight table can contain both dimensions and e)pressions, Straight table also implemented with the report sers. Be!ore creating the straight table we re< ire the gro p which we will implement within the table. 4ow we are going to create gro p, go to Setting -= %oc ment Properties.

4ow the window will open.......

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 1/

-hoose the re< ired gro p, we are selecting c+clic gro p 6to toggle between !ields7, so we have to chec# the option A-+clic Gro pB. -hoose the !ields A.irline,%estination cit+ and :rigin cit+B = :'.

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 10

Then -=.ppl+-=o# 4ow we are moving toward the chart !or implementing new chart right clic# on the sheet-=goto the new sheet ob3ect-=charts select the table-=ne)t

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 11

4ow select the -+clic gro p 6which we have created7 in the %imensions tab = 4e)t

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 18

4ow go to the e)pression tab.

clic# on the .dd option this will allow s to add the e)pression. -reate C .dd 8 e)pressions !or the below mentioned 8 variables.

Goto the (ariables here select the variable e%epart rePer!orm then paste, this will wor# as a s m62%epart rePer!ormed7 e)pression = Paste the e)pression = :'

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 1D

The variable AeFoad?actorB which replaces the s m62Transported passenger7Cs m62.vailable seats7-=clic# to the Paste option-=o#

?or the variable eEnplanedpassengers which will replace the s m62TransportedPassenger7=clic# to the .dd

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 1@

4ow these are all the e)pressions which have been created.

4ow here the table is created. -lic# on the -+clic .rrow in the chart to see the val es !or di!!erent !ields related to the 8 e)pressions created.

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 19

Below is the review o! the variables we have created

Foo# here the c+clic gro p present, this is the gro p in which we have Implemented the three !ield :rigin -it+, .irline and %estination cit+.............

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 1;

:n clic#ing the .ir line this will show all the records o! the .irline

:n clic#ing the destination cit+ this will displa+ all the record related to the destination cit+

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 1J

In this straight table we have added a gro p which is .irlineT:riginT%estination. >e will se the e)pression AGet- rrent?ield67B which will give s the c rrent !ield o! the e)pression which is selected onward in the title o! the chart. This command will give the in!ormation abo t the c rrent selected !ield. ?or implement this goto the -=chart properties -=general tab-=then clic# on the e)pression tab here add the e)pression.

This e)pression is ver+ case sensitive a little error is not acceptable in this e)pression here the e)pression started with the S s+mbol beca se this will displa+ the res lt i! this s+mbol is not sed and the res lt will not be visible and the whole e)pression will per!orm as a simple string. 4ow the e)pression is SU'PIs perUPGet- rrent?ield6.irlineT:riginT%estination7 will give the c rrent !ield as a res ltant.

Then appl+-=o#

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 15

Since here in the title show that 'PIs per %estination cit+ and the in!ormation showing is o! abo t destination cit+.

I! we clic# on .irline this will show all the data o! airline.

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 8/

I! we clic# on the origin cit+ this will displa+ all the data related to the origin cit+.

www.bispsol tions.com

www.bisptrainigs.com

www.h+periong r .com

Page 80

You might also like