Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
sum({$<
[Bill Date] = {"<=$(_SysCalendarLastWorkingDayCurrYear)>=$(_SysCalendarYearStartCurrYear)"},
Year = {*},
Period = {*},
Date = {*},
Month = {*},
[Calendar Year] = {*},
QuarterName = {*},
[LinkId] = {"FIN"},
[BillReq GL Code] = {"01-120.2001","01-120.2008","01-120.2002","01-121.2603"}
>}
[Bill Value] * $(RevenueRate))
//Sum({$<[BROKER]={'BLKR'},[BS Date]={'10/31/2014', '11/28/2014'}>}[BALANCE])
We have purchased a version of Qlikview that has 300 charts pre-written against our database. As needed we create our own charts or modify an existing chart. Today I struggled with aggregating based on two variables. In green is the code I copied from Sunny Tulwar (Thank You!) which led me to the line [BillReq GL Code] = {"01-120.2001","01-120.2008","01-120.2002","01-121.2603"}. The rest of the code is from the pre-written code.
What is going on in the pre-written code? Why can't I modify Sunny's code which seems to be much more efficient? What is a [LinkId] since I don't have a table called "FIN"?
Hopefully somebody can help me bridge the gap between the code on this Website and the Pre-written code.
Thanks!!
The code between {$< and >} is called set analysis:
Why is it called Set Analysis?
You can think of it like creating a user selection in list boxes just for the scope of the sum() function.
(Left of the equal signs are the fields you can create list boxes for, on the right side you define the 'new' or 'custom' set you want ).
I can't comment on specifics like 'What is LinkId since...' without knowing your data model and data values.
The ABove set expression explains this :
Sum the column [Bill Value] where [Bill Date] is less than or equal $(_SysCalendarLastWorkingDayCurrYear) and gretaer than or e qual to to $(_SysCalendarYearStartCurrYear)
for all values of column Year (Year = {*}, here * means Select All values),
for all values of column Period = {*},
for all values of column Date = {*},
for all values of column Month = {*},
for all values of column [Calendar Year] = {*},
for all values of column QuarterName = {*},
for values of column [LinkId] = {"FIN"}, (here it takes only FIN from column [LinkId],FIN is not table name here,its a field value)
for all values of column [BillReq GL Code] = {"01-120.2001","01-120.2008","01-120.2002","01-121.2603"}
Hope that help you understand your code.
Thanks
Krishna