Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

set analysis syntax

I have difficulties understanding the syntax of set analysis. What does the ' = ' exactly do?

some information:

vShipDate is a variable based on a selection in EDCDate: = only(EDCDate)

all date formats are yyymmdd (eg: 20170911)

why do those formulas give me different results?

=sum({<ExpectedShipDate={'>$(vShipDate)'}, ErsterfassungsDatum={'=$(vShipDate)'}>}BypackQuantity) = 136.892

=sum({<ExpectedShipDate={'>$(vShipDate)'}, ErsterfassungsDatum={'$(vShipDate)'}>}BypackQuantity) = 124.725


I only want to sum quantities which fulfill both conditions.


thanks,

Lucas

17 Replies
Anil_Babu_Samineni

Looks like you restrict same variable. Can you try this?

ErsterfassungsDatum={'$(=vShipDate)'}

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

it gives the same result as the second formula

what do you mean with 'restrict the same variable'?

vShipDate is set with a selection

now i want the sum from datasets where

ErsterfassungsDatum is equal to my selection

and

ExpectedShipDate is larger than my selection


maybe im trying it the wrong way?

Anil_Babu_Samineni

What are you getting without variable?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Colin-Albert

Try this. Note that the search expression is enclosed in double quotes.

ErsterfassungsDatum={">=$(vShipDate)"}


To check your set expression, add the column to a Straight Table chart with a blank column label.

Then if you hover your mouse on the column header the pop-up will show the expression evaluating the variables.



Chanty4u
MVP
MVP

try this

remove= from variable before

=sum({<ExpectedShipDate={'>$(vShipDate)'}, ErsterfassungsDatum={$(=vShipDate)}>}BypackQuantity)


Anonymous
Not applicable
Author

it eveluates correctly from what i see:

"=20170911" with the same result as my first formula

ErsterfassungsDatum={'=$(vShipDate)'}

Anonymous
Not applicable
Author

this gives the same result as my first formula.

when i hard code it  ErsterfassungsDatum = {'20170911'} it gives me the result of my first formula. So i would assume, this is the one I would like to see.

but what does the ' = ' exactly do?

Chanty4u
MVP
MVP

= remove at variable creation place not in expression

Colin-Albert

Hi Lucas,

Does your data actually have different BypackQuantaties against different ExpectedShipDates for the same ErsterfassungsDatum value?


What result do you get if you hard-code the dates into a set expression in a new column in your chart?

=sum({<ExpectedShipDate={">20170911"}, ErsterfassungsDatum={20170911}>} BypackQuantity)

and also add two other columns

=sum({<ExpectedShipDate={">20170911"}>} BypackQuantity)

=sum({<ErsterfassungsDatum={20170911}>} BypackQuantity)


Do these three columns have the same values?

This may help identify the problem.