Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Looks like you restrict same variable. Can you try this?
ErsterfassungsDatum={'$(=vShipDate)'}
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?
What are you getting without variable?
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.
try this
remove= from variable before
=sum({<ExpectedShipDate={'>$(vShipDate)'}, ErsterfassungsDatum={$(=vShipDate)}>}BypackQuantity)
it eveluates correctly from what i see:
"=20170911" with the same result as my first formula
ErsterfassungsDatum={'=$(vShipDate)'}
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?
= remove at variable creation place not in expression
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.