Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
InYTD what is mean by YTD={1} and YTD={0}?
Sorry, you will have to explain. What do you mean by YTD? Do you mean the 'Year2Date' expression?
Yes
Its Set Expression, see manual at topic Set Analysis
This is solution to override user's selections for most aggregation functions. ![]()
This is part of a set expression doing a comparison on a field named YTD to a numeric value
YTD={1} is the equivalent of "where YTD = 1" or "if YTD =1"
YTD={0} is the equivalent of "where YTD = 0" or "if YTD = 0"
Hi Colin
Thanks for replay
What it mens exactly if i place YTD={1} and YTD={0}(1 and 0 represents?)
To include two values as part of a set modified you would use YTD={0,1}
If the values were text then syntax would be FieldName = {'A', 'B','C'}
The curly braces indicate that the field is being compared to a set of values.
In set analysis i need to calculate Sales on YTD Basis can i write expression for
Current Year: Sum({<Year={$(currentYear)},YTD={1}>}Sales) (Here Current Year means -2014)
Previous Year: Sum({<Year={$(PreviousYear)},YTD={1}>}Sales) (Previou Year means-2013)
is it correct?
if i place YTD={0} insted of YTD={1} then is there any result changes?
Sanjeev , 1 and 0 likely mean the field 'YTD' is a boolean flag. This is a common technique when you have a calendar table. It is common to create a boolean flag field to denote whether the date value on a specific row of the calendar table falls within the current year to date period. With the flag in place it is very easy to slice a dashboard to see YTD values only. For the context of a chart to show YTD values only, a SET EXPRESSION such as follow with YTD={1} would focus the chrat to show YTD values only:
sum( {$<YTD={1}>} Sales)
Thanks for Explanation,
If i want previous year sales in YTD
then
can i write like this? Sum({<Year={$(Previous Year)},YTD={1}>}Sales)