QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save \$300 before February 6: REGISTER NOW!
cancel
Showing results for
Did you mean:
Creator II

difference of 2 expressions

1) Sum( {\$<Year = (Year + {“20*”,1997}) – {2000} >} Sales )

2) Sum( {\$<Year = Year + ({“20*”,1997} – {2000}) >} Sales )

What is the difference between 1 and 2?

14 Replies
Creator II

Hi

In the first expression

First, it will add the current year to 20 series years plus 1997 and then it will subtract it will 2000 ,then based on the resultant value of year it will calculate the sum of sales.

In the second expression

First, it will do the subtraction of 20series plus 1997 to 2000 , then resultant value is added to the current year and based on the final year  value it will calculate the sum of sales.

Thanks

Kumar

Master II

sum( {\$<Year = Year + ({“20*”,1997} – {2000}) >} Sales )
returns the sales for the current selection but with additional selections in the field “Year”: 1997 and all that begin with “20” – however, not 2000. Note that if 2000 is included in the current selection, it will still be included after the modification.

sum( {\$<Year = (Year + {“20*”,1997}) – {2000} >} Sales )
returns almost the same as above, but here 2000 will be excluded, also if it initially is included in the current selection. The example shows the importance of sometimes using brackets to define an order of precedence.

Creator II
Author

Will both give same results?

Master II

no, in the second example the 2000 is excluded whereas in example 1 it is included!

1) Sum( {\$<Year = (Year + {“20*”,1997}) – {2000} >} Sales )

* Means What ever value after 20-- from Year field

2000 --- 2016 and 1997 and then remove the 2000 Data from Year Field the value of Sales

2) Sum( {\$<Year = Year + ({“20*”,1997} – {2000}) >} Sales )

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
MVP

Are these expression even working? I have a strange feeling that both of them might not be working, but I may be wrong.

Master II

But they are described in the QV help, so they should work 🙂

MVP

Oh really? Would you be able to guide me to location of these expressions. I would love to understand the syntax

Master II

search for : {set_identifier<set_modifier>}

in QV help. There is only one hit. you will find the expressions within that page 🙂

Community Browser