Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
surajap123
Creator II
Creator II

Set Analysis with field=,

Hi,

1.I wanted to know the difference between the below 2 expressions. Both of them giving the same result for me in my chart, then why we prefer the second one.

2. Also, what does field=no value(Eg- Day=,) do in set analysis?

=SUM({<Year={'$(vPriorYear)'},Date={'<=$(vPriorYearDate)'}>}Amount)

=SUM({<Year={'$(vPriorYear)'},Month=,Day=,Date={'<=$(vPriorYearDate)'},MonthYear=>}Amount)

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

Both expression are equal

=SUM({<Year={'$(vPriorYear)'},Date={'<=$(vPriorYearDate)'}>}Amount)

=SUM({<Year={'$(vPriorYear)'},Month=,Day=,Date={'<=$(vPriorYearDate)'},MonthYear=>}Amount)

... unless you select a Month, Day or MonthYear, in that cases values will change because in the first expression you consider that selection in the second expression you compute Amount without taking care of Month, Day or MonthYear selections (field= means don't use if selected)

Hope it helps

View solution in original post

7 Replies
ThornOfCrowns
Specialist II
Specialist II

FieldName=, means ignore what is selected for that field.

Not applicable

Means bypassing the selections of that field.

ie, It will consider the total data of that field regardless of selections.

alexandros17
Partner - Champion III
Partner - Champion III

Both expression are equal

=SUM({<Year={'$(vPriorYear)'},Date={'<=$(vPriorYearDate)'}>}Amount)

=SUM({<Year={'$(vPriorYear)'},Month=,Day=,Date={'<=$(vPriorYearDate)'},MonthYear=>}Amount)

... unless you select a Month, Day or MonthYear, in that cases values will change because in the first expression you consider that selection in the second expression you compute Amount without taking care of Month, Day or MonthYear selections (field= means don't use if selected)

Hope it helps

tresesco
MVP
MVP

1. If you have fields Month, Day then with first expression user would not get the right result if they get to select from either of them. That again depends on how you have declared your variable.

2. Day=,   -> indicates that any selection in the field Day would be disregarded.

I would recommend you to go through help file or reference mauanl first, that would clear your basic doubts.

surajap123
Creator II
Creator II
Author

Thanks a lot for the valuable inputs.

I am actually looking at PriorPeriodComarision app build by Steve Dark, which I have attached here-

I am still not clear about the significance of field=,. I mean, even with Field=, in the expression, when i make selection on Day 1 in the list box the values

Change from 153,368.40 to 149,568.46 with below expression--

=SUM({<Year={'$(vMaxYear)'},Date={'<=$(vMaxDate)'},Month=,Day=,MonthYear=>}Amount)

and Change from 153,368.40 to 5,273.08 with below expression--

=SUM({<Year={'$(vMaxYear)'},Date={'<=$(vMaxDate)'}>}Amount)

I am not sure, how the app is calculating?

Sorry, If my question is very basic.

nizamsha
Specialist II
Specialist II

month=

This is ignoring the selection suppose u have sales 1000

expression

sum({$<year={"$(=Max(Year),month=)"}>}sales)

When u click on the year current selection is the year and the sales amount will change based on the year

but when u click on the month sales values wont change

surajap123
Creator II
Creator II
Author

Hi Nizam,

I see that selections are not ignoried. when I make selection on Day and Month, the values of Amount is changing. The chart contains the below expression.

=SUM({<Year={'$(vMaxYear)'},Date={'<=$(vMaxDate)'},Month=,Day=,MonthYear=>}Amount)