|
Expression
|
Meaning
|
|
sum({<Year={“<2015”}>}
revenue)
|
Less
than 2015 year
|
|
sum({<Year={“>=2011
<=2015”}>} revenue)
|
Less
than 2015 year, Greater Than 2011 (inclusive)
|
|
sum({<Year={2005,
2007} + {“>=2011 <2015”}>} revenue)
|
2005,
2006, Less than 2015 year (Excluding 2015), Greater Than 2011 (including
2011)
|
|
sum( {$
<$(vDim)={"*"} >} [revenue])
|
We can use variables with the $
sign. This variable may contain members but also a dimension
|
|
sum({$
<$(vSet) >} [Volume Sales])
|
Using a variable storing the
whole set
vSet variable must contain a
valid syntax except <> like MANUFACTURER_LDESC ={"*"},
TIME_SDESC={"P 01/13"}
Year={2005, 2007} + {“>=2011 <2015”}
|
|
<Year
= {"$(=max({1} Year))"}>
|
Using a function
<Dimension = {"
$(=f(args)) "}>
|
|
Sum({<KeyAutoNumber =
{"=(DayDelivery=DayOrder)" } >} Sales)
Sum({<KeyAutoNumber = {"=(DayDelivery < DayOrder
-7)" } >} Sales)
|
Using two fields
We want to get the sales that have been delivered the same
day. We have two fields : DayDelivery and
DayOrder
|
|
Sum(if(DayDelivery=DayOrder,
Sales))
|
You can get an equivalent to the above syntax but this is
slower because QlikView needs to compute all
the lines of the scope:
|
|
sum({<$(vSet)>} Sales)
|
Let’s create a variable vSet
that will be a formula:=if(GetSelectedCount(Product)=1, 'Product=', '$')
|
BI tips and tricks with qlikview, Set Analysis, Qvds, Script, Expressions, Charts, Dimentions, various properties, Analysis
Friday, June 12, 2015
Set Analysis-I
Subscribe to:
Posts (Atom)