Você está na página 1de 26

HOW TO CREATE A P&L

STATEMENT
QlikView Technical Brief
July 2012
QlikView 11
Contents
How to Create a Profit and Loss Stateent ! 2

"ntroduction
"n this docuent# the ste$s to create a Profit and Loss %P&L' stateent
usin( QlikView 11 will )e outlined* +hat is a P&L stateent, - P&L
stateent easures a co$any.s sales and e/$enses durin( a selected
$eriod of tie* "t allows the co$any to deterine if they ha0e ade
oney or lost oney durin( a selected tiefrae* The P&L stateent
dis$lays cate(ories for sales and e/$enses1 net sales# cost of (oods
sold# (ross ar(in# o$eratin( e/$enses# o$eratin( incoe and net $rofit
or net incoe* - co$any can use a P&L to 0iew how their re0enue is
transfored into the net incoe* The key thin( to note a)out a P&L
stateent is that it re$resents a $eriod of tie*
How to Create a Profit and Loss Stateent ! 2
SUPPORTING MATERIALS
3 QVW. - QV+ titled How to Create
a Profit and Loss Stateent*40w
was created illustratin( the final
P&L stateent that was created
usin( the ste$s outlined in this
docuent
3 Video. - short 0ideo is also
a0aila)le $ro0idin( a 4uick look at
the ste$s outlined in this docuent
Set the Scene
Co$any -BC wants to )e a)le to see their $rofit and loss in one chart for 0arious tiefraes*
They ha0e the P&L headin(s they would like to use in an 5/cel s$readsheet )ut need to
deterine how they can translate that and their financial data into a QlikView chart that looks like
this1
FUNCTIONS, FEATURES AND TRICKS USED
To create the P&L stateent in QlikView# the followin( QlikView functions# features and6or tricks
were used1
7se of P&L headin(s fro 5/cel s$readsheets
"nter0al8atch stateent
8T9 %onth:to:date' and ;T9 %year:to:date' analysis
This a$$lication assues that the current date is 9ece)er 1<# 2011*
How to Create a Profit and Loss Stateent ! =
9ata 8odel
Before )e(innin(# let.s take a look at the data odel and how we loaded the P&L headin(s
Co$any -BC wants to use in the P&L stateent* Below is an illustration of the data odel
created* The QV+ %link to QVW' can also )e o$ened to 0iew the data odel*
How to Create a Profit and Loss Stateent ! >
TABLES
-ccount8aster : stores the 0arious financial accounts
-ccountBalance ? stores the transactions ade a(ainst the accounts
8onth ? inline ta)le that stores the onth for the financial $eriods
5/ecProfitLoss ? stores the P&L headin(s to )e used in the P&L stateent as well as fla(s
to indicate s$aces %)lank rows' and calculation rows
"nter0al8atch ? stores the re$ortin( code which corres$onds to the P&L start and end for
each row in the P&L stateent
Syn 1 Ta)le ? this synthetic ta)le is ok in this data odel* "t was created as a result of the
inter0alatch used in the scri$t* This ta)le stores the start and end for the rows dis$layed in
the P&L re$ort*
Scri$t
@or the ost $art the scri$t used to create the data odel is strai(ht:forward )ut to add the $rofit
and loss data was a little trickier* "t in0ol0ed usin( the "nter0al8atch stateent* "llustrated )elow
is how the P&L data was added to the data odel*
1* Load the -ccount8aster ta)le
How to Create a Profit and Loss Stateent ! A
//Load AccountMaster Excel spreadsheet
AccountMaster:
LOAD
[Account Number] & '_' & [Business nit] & '_' & !ubsidiar" as AccountMaster#e"$
[Business nit]$
!ubsidiar"$
[Account %escription]$
[Account Number]$
[Account &"pe]$
['eportin( )ode]
*'+M $(vPath)AccountMaster,xls
-bi..$ embedded labels$ table is !heet/012
//Load AccountMaster Excel spreadsheet
AccountMaster:
LOAD
[Account Number] & '_' & [Business nit] & '_' & !ubsidiar" as AccountMaster#e"$
[Business nit]$
!ubsidiar"$
[Account %escription]$
[Account Number]$
[Account &"pe]$
['eportin( )ode]
*'+M $(vPath)AccountMaster,xls
-bi..$ embedded labels$ table is !heet/012
//Load AccountMaster Excel spreadsheet
AccountMaster:
LOAD
[Account Number] & '_' & [Business nit] & '_' & !ubsidiar" as AccountMaster#e"$
[Business nit]$
!ubsidiar"$
[Account %escription]$
[Account Number]$
[Account &"pe]$
['eportin( )ode]
*'+M $(vPath)AccountMaster,xls
-bi..$ embedded labels$ table is !heet/012
//Load AccountMaster Excel spreadsheet
AccountMaster:
LOAD
[Account Number] & '_' & [Business nit] & '_' & !ubsidiar" as AccountMaster#e"$
[Business nit]$
!ubsidiar"$
[Account %escription]$
[Account Number]$
[Account &"pe]$
['eportin( )ode]
*'+M $(vPath)AccountMaster,xls
-bi..$ embedded labels$ table is !heet/012
//Load AccountMaster Excel spreadsheet
AccountMaster:
LOAD
[Account Number] & '_' & [Business nit] & '_' & !ubsidiar" as AccountMaster#e"$
[Business nit]$
!ubsidiar"$
[Account %escription]$
[Account Number]$
[Account &"pe]$
['eportin( )ode]
*'+M $(vPath)AccountMaster,xls
-bi..$ embedded labels$ table is !heet/012
//Load AccountMaster Excel spreadsheet
AccountMaster:
LOAD
[Account Number] & '_' & [Business nit] & '_' & !ubsidiar" as AccountMaster#e"$
[Business nit]$
!ubsidiar"$
[Account %escription]$
[Account Number]$
[Account &"pe]$
['eportin( )ode]
*'+M $(vPath)AccountMaster,xls
-bi..$ embedded labels$ table is !heet/012
2* Load the -ccountBalance ta)le
2* The Profit and Loss re$ortin( data was then loaded
P&L headin(s that are to )e indented were done so )y usin( an if stateent in the scri$t
)y addin( > s$aces )efore the headin(*
=* The final ste$ was to $erfor the "nter0al8atch in order to indicate a start and sto$ $oint
for calculatin( the 0arious P&L cate(ories
This ste$ is what created the synthetic key )ut what it also $ro0ided was the forat as to
how the rows in the P&L stateent should )e added and dis$layed* Here is how the P&L
forat was set u$ in 5/cel1
How to Create a Profit and Loss Stateent ! <
//Load AccountBalance spreadsheet
AccountBalance:
LOAD
[Account Number] & '_' & [Business nit] & '_' & !ubsidiar" as AccountMaster#e"$
3ear as [*iscal 3ear]$
4eriod$
%ate-Ma5edate-3ear$ 4eriod11 as Month3ear$
Month-Ma5edate-3ear$ 4eriod11 as Month$
[Led(er &"pe]$
Amount$
[Bud(et Amount]
*'+M $(vPath)AccountBalance,xls
-bi..$ embedded labels$ table is !heet/012
//Load pro.it and loss spreadsheets
Exec4ro.itLoss:
LOAD
[Exec 4&L Le6el]$
i.-[Exec 4&L )alculation]78'c'$ ' '&[Exec 4&L 9eadin(]$ [Exec 4&L 9eadin(]1 as
[Exec 4&L 9eadin(]$
[Exec 4&L )alculation]$
Exec4L!tart$
Exec4LEnd
*'+M $(vPath)Exec4ro.itLoss,xls
-bi..$ embedded labels$ table is !heet/012
i.-[Exec 4&L )alculation]78'c'$ ' '&[Exec 4&L 9eadin(]$ [Exec 4&L 9eadin(]1
:nter6alMatch:
:N&E';ALMA&)9 -['eportin( )ode]1 LOAD
Exec4L!tart$
Exec4LEnd
'E!:%EN& Exec4ro.itLoss2
The 5/ec P&L Le0el field stores a Bs. to fla( rows that should )e )lank* Note
+hen this is a Bs.# there are s$aces in the 5/ec P&L Calculation colun
The 5/ec P&L Calculation field stores a Bc. if a calculation %su of rows' needs to
)e $erfored
Let.s take a closer look at what is ha$$enin( here*
C5T S-L5S is a su of Dross Sales# Sales Eeturn# Fff "n0oice 9iscounts and
Sales Prootions
TFT-L CFST F@ S-L5S is a su of Cost of Sales# +arehousin( and @rei(ht &
9eli0ery
DEFSS 8-ED"C is the su of C5T S-L5S and TFT-L CFST F@ S-L5S %or
C5T S-L5S inus TFT-L CFST F@ S-L5S'
TFT-L FP5E-T"CD 5GP5CS5S is the su of Sellin( 5/$enses and Deneral &
-dinistrati0e
FP5E-T"CD "CCF85 is the DEFSS 8-ED"C inus the TFT-L FP5E-T"CD
5GP5CS5S
C5T "CCF85 %LFSS' is the FP5E-T"CD "CCF85 inus the Con:F$eratin(
How to Create a Profit and Loss Stateent ! H
5/$enses
How to Create a Profit and Loss Stateent ! I
"n the 5/cel file )elow# see how the 5/ecPLStart and 5/ecPL5nd fields work to define the
forat and calculations of the P&L stateent*
Cow the data odel is created and the creation of the P&L stateent can )e(in*
Ste$s to Create P&L Stateent
Cow that the data odel is co$lete# the P&L stateent can )e created* There were a few
0aria)les created to aid in creatin( the P&L stateent* They are1
1* !"TD"e#$1 Ja/%K@iscal ;earL'
This stores the a/iu fiscal year %$ossi)le or selected'
2* !M#%"TDMo&t'1 J8onth%a/%8onth;ear''
This stores the a/iu fiscal onth %$ossi)le or selected'
Cow let.s )e(in to create the P&L chart1
1* Create list )o/es for Fiscal Year and Month
2* Create a strai(ht ta)le with the 9iension Exec P&L Heading* Check the Suppress
How to Create a Profit and Loss Stateent ! 10
When Value Is ull check)o/
2* "n the $ro$erties for the Exec P&L Heading diension# add the e/$ression )elow to the
Te/t @orat $ro$erty* This will )old the P&L headin(s in the chart
How to Create a Profit and Loss Stateent ! 11
<i.-[Exec 4&L )alculation]<'c'$'7B8'1
=* -dd the se0en 5/$ressions that are to )e dis$layed in the P&L stateent1
a* -ctual %5/$ression M1'
)* Bud(et %5/$ression M2'
c* Variance %5/$ression M2'
d* 5$ty colun %5/$ression M='
e* -ctual 8T9 %5/$ression M>'
f* Bud(et 8T9 %5/$ression MA'
(* Variance 8T9 %5/$ression M<'
A(t)#* +E%,$e--io& ./0
9is$lays the a/iu ;T9 aount if no onth selections are ade and the onth
aount# of the a/iu year# if onth selections are ade* @or e/a$le# if no
selections are ade# the 2011 -ctual 0alues will )e dis$layed as of 9ec 2011 since the
assued current date is 1261<62011* "f @e) is selected# then the -ctual 0alues dis$layed
will )e for @e) 2011*
La)el <vYTDYear&chr-/=1&'Actual'

7se 0aria)le !Y"#Year to
dis$lay the a/ fiscal year
in the colun headin(
9efinition i.-[Exec 4&L Le6el] < 's'$ ''$
!um->7[*iscal 3ear]<>$(vYTDYear)? 8?
[Amount]11

"f the Exec P&L Le!el is
Bs.# then dis$lay a s$ace#
this will )e a )lank row*
Ftherwise dis$lay the su
of $%ount for the a/
fiscal year
Te/t @orat <i.-[Exec 4&L )alculation] < 'c'$
'7B8'1
This will )old the rows that
are calculations
Total 8ode Set to1 Co Totals To $re0ent QlikView fro
totally the entire colun
How to Create a Profit and Loss Stateent ! 12
B)d1et +E%,$e--io& .20
9is$lays the a/iu ;T9 )ud(et aount if no onth selections are ade and the
onth aount# of the a/iu year# if onth selections are ade* @or e/a$le# if no
selections are ade# the 2011 Bud(et 0alues will )e dis$layed as of 9ec 2011 since the
assued current date is 1261<62011* "f @e) is selected# then the Bud(et 0alues dis$layed
will )e for @e) 2011*
La)el <vYTDYear&chr-/=1&'Bud(et'

7se 0aria)le !Y"#Year to
dis$lay the a/ fiscal year
in the colun headin(
9efinition i.-[Exec 4&L Le6el] <
's'$''$!um->7[*iscal 3ear]<>$
(vYTDYear)? 8? [Bud(et Amount]11
"f the Exec P&L Le!el is
Bs.# then dis$lay a s$ace#
this will )e a )lank row*
Ftherwise dis$lay the su
of &udget $%ount for the
a/ fiscal year
Te/t @orat <i.-[Exec 4&L )alculation] < 'c'$
'7B8'1
This will )old the rows that
are calculations
Total 8ode Set to1 Co Totals To $re0ent QlikView fro
totally the entire colun
How to Create a Profit and Loss Stateent ! 12
V#$i#&(e +E%,$e--io& .30
9is$lays the ;T9 0ariance $ercenta(e )etween the actual aount and the )ud(et
aount if no onth selections are ade and the onth 0ariance# of the a/iu year# if
onth selections are ade* @or e/a$le# if no selections are ade# the 2011 Variance
N will )e dis$layed as of 9ec 2011 since the assued current date is 1261<62011* "f @e)
is selected# then the Variance $ercenta(e dis$layed will )e for @e) 2011*
La)el <vYTDYear&chr-/=1&' ;ariance @' 7se 0aria)le !Y"#Year to
dis$lay the a/ fiscal year
in the colun headin(
9efinition i.-[Exec 4&L Le6el] < 's'$''$
-i.-[Exec 4&L Le6el] < 's'$
''$!um->7[*iscal 3ear]<>$
(vYTDYear)? 8? [Amount]11
A
i.-[Exec 4&L Le6el] < 's'$''$
!um->7[*iscal 3ear]<>$(vYTDYear)?
8? [Bud(et Amount]111
/
.abs-i.-[Exec 4&L Le6el] < 's'$''$
!um->7[*iscal 3ear]<>$(vYTDYear)?
8? [Bud(et Amount]1111
"f the Exec P&L Le!el is Bs.#
then dis$lay a s$ace# this
will )e a )lank row*
Ftherwise dis$lay the
Variance ' for the a/
fiscal year
Te/t Color <i.---i.-[Exec 4&L Le6el] <
's'$''$!um->7[*iscal 3ear]<>$
(vYTDYear)? 8? [Amount]11
A
i.-[Exec 4&L Le6el] <
's'$''$!um->7[*iscal 3ear]<>$
(vYTDYear)? 8? [Bud(et Amount]111
/
.abs-i.-[Exec 4&L Le6el] <
's'$''$!um->7[*iscal 3ear]<>$
(vYTDYear)? 8? [Bud(et Amount]1111
7<=$ Li(ht'ed-11
"f Variance "s less than or
e4ual to 0# then dis$lay the
0ariance in red
How to Create a Profit and Loss Stateent ! 1=
Te/t @orat <i.-[Exec 4&L )alculation] < 'c'$
'7B8'1
This will )old the rows that
are calculations
Total 8ode Set to1 Co Totals To $re0ent QlikView fro
totally the entire colun
E4,t5 (o*)4& +E%,$e--io& .60
To se$arate the ;T9 fro the 8T9# a )lank colun was added*
La)el - s$ace
9efinition - s$ace
Back(round
Color
<'BB-CDE$CDE$CDE1 Chan(e the )ack(round
color to that of the colun
headin(s
Te/t Color <'BB-CDE$CDE$CDE1 Chan(e the te/t color of
this )lank colun to that of
the )ack(round
Total 8ode Set to1 Co Totals To $re0ent QlikView fro
totally the entire colun
How to Create a Profit and Loss Stateent ! 1>
A(t)#* MTD +E%,$e--io& .70
9is$lays the 8T9 aount for the a/iu $ossi)le onth year or a/iu onth year
selected* @or e/a$le# if no selections are ade# the 9ec 2011 -ctual 8T9 0alues will
)e dis$layed for 9ec 2011 since the assued current date is 1261<62011* "f @e) is
selected# then the 8T9 0alues for @e) 2011 will )e dis$layed* "f @e)# 8ar and -$r are
selected# then the 8T9 0alues for -$r 2011 will )e dis$layed since it is the a/iu
onth year 0alue*
La)el <vMaxYTDMonth&' '&vYTDYear&chr-/=1&
'Actual M&%'
7se 0aria)les
!MaxY"#Month and
!Y"#Year to dis$lay the
a/ fiscal onth and year
in the colun headin(
9efinition i.-[Exec 4&L 9eadin(] 78 null-1$
i.-[Exec 4&L Le6el] < 's'$''$
sum->7 [*iscal 3ear]<>$(vYTDYear)?$
Month<>$(vMaxYTDMonth)? 8?
[Amount]1
11
"f the Exec P&L Heading is
not null then check to see if
Exec P&L Le!el is Bs.* "f it
is# then dis$lay a s$ace#
this will )e a )lank row*
Ftherwise dis$lay the su
of the $%ount for the a/
fiscal onth and year
Te/t @orat <i.-[Exec 4&L )alculation] < 'c'$
'7B8'1
This will )old the rows that
are calculations
Total 8ode Set to1 Co Totals To $re0ent QlikView fro
totally the entire colun
How to Create a Profit and Loss Stateent ! 1A
B)d1et MTD +E%,$e--io& .80
9is$lays the 8T9 )ud(et aount for the a/iu $ossi)le onth year or a/iu
onth year selected* @or e/a$le# if no selections are ade# the 9ec 2011 Bud(et 8T9
0alues will )e dis$layed for 9ec 2011 since the assued current date is 1261<62011* "f
@e) is selected# then the 8T9 )ud(et 0alues for @e) 2011 will )e dis$layed* "f @e)# 8ar
and -$r are selected# then the 8T9 )ud(et 0alues for -$r 2011 will )e dis$layed since it
is the a/iu onth year 0alue selected*
La)el <vMaxYTDMonth&' '&vYTDYear&chr-/=1&
'Bud(et M&%'
7se 0aria)les
!MaxY"#Month and
!Y"#Year to dis$lay the
a/ fiscal onth and year
in the colun headin(
9efinition i.-[Exec 4&L 9eadin(] 78 null-1$
i.-[Exec 4&L Le6el] < 's'$''$
sum->7 [*iscal 3ear]<>$(vYTDYear)?$
Month<>$(vMaxYTDMonth)? 8? [Bud(et
Amount]1
11
"f the Exec P&L Heading is
not null then check to see if
Exec P&L Le!el is Bs.* "f it
is# then dis$lay a s$ace#
this will )e a )lank row*
Ftherwise dis$lay the su
of the &udget $%ount for
the a/ fiscal onth and
year
Te/t @orat <i.-[Exec 4&L )alculation] < 'c'$
'7B8'1
This will )old the rows that
are calculations
Total 8ode Set to1 Co Totals To $re0ent QlikView fro
totally the entire colun
How to Create a Profit and Loss Stateent ! 1<
V#$i#&(e MTD +E%,$e--io& .90
9is$lays the 8T9 0ariance $ercenta(e )etween the actual 8T9 aount and the )ud(et
8T9 aount* @or e/a$le# if no selections are ade# the 9ec 2011 Variance N will )e
dis$layed as of 9ec 2011 since the assued current date is 1261<62011* "f @e) is
selected# then the 8T9 Variance $ercenta(e dis$layed will )e for @e) 2011*
La)el <vMaxYTDMonth&' '&vYTDYear&chr-/=1&
'M&% ;ariance @'
7se 0aria)les
!MaxY"#Month and
!Y"#Year to dis$lay the
a/ fiscal onth and year
in the colun headin(
9efinition i.-[Exec 4&L 9eadin(] 78 null-1$
i.-[Exec 4&L Le6el] < 's'$''$
-i.-[Exec 4&L 9eadin(] 78 null-1$
i.-[Exec 4&L Le6el] < 's'$''$
sum->7 [*iscal 3ear]<>$(vYTDYear)?$
Month<>$(vMaxYTDMonth)? 8?
[Amount]1
11
A
i.-[Exec 4&L 9eadin(] 78 null-1$
i.-[Exec 4&L Le6el] < 's'$''$
sum->7 [*iscal 3ear]<>$(vYTDYear)?$
Month<>$(vMaxYTDMonth)? 8? [Bud(et
Amount]1
11
1/
.abs-
i.-[Exec 4&L 9eadin(] 78 null-1$
i.-[Exec 4&L Le6el] < 's'$''$
sum->7 [*iscal 3ear]<>$(vYTDYear)?$
Month<>$(vMaxYTDMonth)? 8? [Bud(et
Amount]1
11111
"f the Exec P&L Heading is
not null then check to see if
Exec P&L Le!el is Bs.* "f it
is# then dis$lay a s$ace#
this will )e a )lank row*
Ftherwise dis$lay the su
of the Variance ' for the
a/ fiscal onth and year
How to Create a Profit and Loss Stateent ! 1H
Te/t Color <i.-i.-[Exec 4&L 9eadin(] 78
null-1$i.-[Exec 4&L Le6el] <
's'$''$
-i.-[Exec 4&L 9eadin(] 78
null-1$i.-[Exec 4&L Le6el] <
's'$''$
sum->7 [*iscal 3ear]<>$(vYTDYear)?$
Month<>$(vMaxYTDMonth)? 8?
[Amount]1
11
A
i.-[Exec 4&L 9eadin(] 78
null-1$i.-[Exec 4&L Le6el] <
's'$''$
sum->7 [*iscal 3ear]<>$(vYTDYear)?$
Month<>$(vMaxYTDMonth)? 8? [Bud(et
Amount]1
11
1/
.abs-
i.-[Exec 4&L 9eadin(] 78
null-1$i.-[Exec 4&L Le6el] <
's'$''$
sum->7 [*iscal 3ear]<>$(vYTDYear)?$
Month<>$(vMaxYTDMonth)? 8? [Bud(et
Amount]1
11
1
11
7<=$ Li(ht'ed-11
"f the 8T9 Variance is less
than or e4ual to 0 then
dis$lay the 0ariance in red
Te/t @orat <i.-[Exec 4&L )alculation] < 'c'$
'7B8'1
This will )old the rows that
are calculations
Total 8ode Set to1 Co Totals To $re0ent QlikView fro
totally the entire colun
How to Create a Profit and Loss Stateent ! 1I
>* Cow the key to ensurin( that the P&L headin(s dis$lay in the correct order is to sort the
chart )y the P&L Headin( field )y the Fri(inal Load Frder*
How to Create a Profit and Loss Stateent ! 20
A* Fn the Presentation ta) of the chart $ro$erties# check the +ra$ Header Te/t check )o/ in
the 8ultiline Settin(s and set the Header Hei(ht to 2 to create taller headers
How to Create a Profit and Loss Stateent ! 21
<* Fn the Cu)er ta) in the chart $ro$erties
a* @orat the actual and )ud(et e/$ressions %1
st
# 2
nd
# >
th
and A
th
e/$ression' as
8oney with this forat $attern1 OM#MM0P%OM#MM0'
)* @orat the 0ariance e/$ressions %2
rd
and <
th
e/$ression' as @i/ed to with 1
decial $lace and check the Show in Percent %N' check)o/
How to Create a Profit and Loss Stateent ! 22
-t this $oint# the P&L stateent is co$lete* -dditional desi(n chan(es to the chart can )e
ade if desired*
How to Create a Profit and Loss Stateent ! 22
-dditional Thin(s to Consider
-dditional analysis that can )e added to the P&L stateent includes e/$ressions dis$layin( the
$re0ious year actuals and the $re0ious year.s onth:to:date actuals* Here are the details for
creatin( these e/$ressions*
P$e!io)- "e#$ A(t)#*
9is$lays the ;T9 aount for the $re0ious year*
La)el <$(=vYTDYear-1)&chr-/=1&' Actual' Su)tract 1 fro the
!Y"#Year 0aria)le to
dis$lay the $re0ious fiscal
year in the colun headin(
9efinition i.-[Exec 4&L 9eadin(] 78 null-1$
i.-[Exec 4&L Le6el] < 's'$''$
sum->7 [*iscal 3ear]<>$(=vYTDYear-
1)?8? [Amount]1
11

"f the Exec P&L Le!el is Bs.#
then dis$lay a s$ace# this
will )e a )lank row*
Ftherwise dis$lay the su
of $%ount for the $re0ious
fiscal year
Te/t @orat <i.-[Exec 4&L )alculation]<'c'$
'7B8'1
This will )old the rows that
are calculations
Total 8ode Set to1 Co Totals To $re0ent QlikView fro
totally the entire colun
How to Create a Profit and Loss Stateent ! 2=
P$e!io)- "e#$ MTD A(t)#*
9is$lays the 8T9 aount for $re0ious year*
La)el <vMaxYTDMonth&' '&$(=vYTDYear-1)
&chr-/=1&
'Actual M&%'
7se the !MaxY"#Month
0aria)le and su)tract 1
fro the !Y"#Year
0aria)le to dis$lay the
$re0ious fiscal onth and
year in the colun headin(
9efinition i.-[Exec 4&L 9eadin(] 78 null-1$
i.-[Exec 4&L Le6el] < 's'$''$
sum->7 [*iscal 3ear]<>$(=vYTDYear-
1)?$ Month<>$(vMaxYTDMonth)? 8?
[Amount]1
11
"f the Exec P&L Heading is
not null then check to see if
Exec P&L Le!el is Bs.* "f it
is# then dis$lay a s$ace#
this will )e a )lank row*
Ftherwise dis$lay the su
of the M"# $%ount for the
$re0ious year
Te/t @orat <i.-[Exec 4&L )alculation]<'c'$
'7B8'1
This will )old the rows that
are calculations
Total 8ode Set to1 Co Totals To $re0ent QlikView fro
totally the entire colun
Suary
"n this technical )rief# the ste$s to create a P&L stateent in QlikView 11 were outlined with a
focus on creatin( the 5/ecProfitLoss ta)le that stores the P&L headers and desi(nin( the chart
so that the P&L is foratted siilar to what you would find in a P&L re$ort* The )eauty of doin(
this in QlikView is the a)ility for the user to select the tiefrae they would like to see in the P&L
stateent and instantaneously see the 0alues*
How to Create a Profit and Loss Stateent ! 2>
Eeferences
Below are su$$ortin( aterials that ay )e hel$ful1
QV+ : How to Create a Profit and Loss Stateent*40w
Video : How to Create a Profit and Loss Stateent
www*4lik0iiew*co
How to Create a Profit and Loss Stateent ! 2A
Q 2012 QlikTech "nternational -B* -ll ri(hts reser0ed* QlikTech# QlikView# Qlik# Q# Si$lifyin( -nalysis for 50eryone# Power of Si$licity# Cew Eules# The 7ncontrolla)le Sile and other QlikTech
$roducts and ser0ices as well as their res$ecti0e lo(os are tradearks or re(istered tradearks of QlikTech "nternational -B* -ll other co$any naes# $roducts and ser0ices used herein are tradearks
or re(istered tradearks of their res$ecti0e owners* The inforation $u)lished herein is su)Rect to chan(e without notice* This $u)lication is for inforational $ur$oses only# without re$resentation or
warranty of any kind# and QlikTech shall not )e lia)le for errors or oissions with res$ect to this $u)lication* The only warranties for QlikTech $roducts and ser0ices are those that are set forth in the
e/$ress warranty stateents acco$anyin( such $roducts and ser0ices# if any* Cothin( herein should )e construed as constitutin( any additional warranty*

Você também pode gostar