Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Set expressions are evaluated on the chart level, i.e. only once per chart.
You need to use e.g. an if statement in your calculation to filter for your upper and lower bounds.
Here is an example:
Incorrect Expression:
Sum({<Category={">=$(=Min(Lower)) <=$(=Max(Upper))"}>} Measure)
Correct Expression:
Sum(If(Category >= Lower and Category <= Upper, Measure))
Script:
Data:
NoConcatenate Load
Ceil(Rand() * 3) as Category,
RangeMin(Res1, Res2) as Lower,
RangeMax(Res1, Res2) as Upper,
1 as Measure;
Load
Ceil(Rand() * 3) as Res1,
Ceil(Rand() * 3) as Res2
AutoGenerate 1000;
thak You very much for your guidiance , you made me to use the if statement and it was just very simple - Avg(
If(
[Collection date] >= AddMonths([Change date], -6) and [Collection date] <= [Change date],
ANB
)
)
and it worked just fine.
cheers
Set expressions are evaluated on the chart level, i.e. only once per chart.
You need to use e.g. an if statement in your calculation to filter for your upper and lower bounds.
Here is an example:
Incorrect Expression:
Sum({<Category={">=$(=Min(Lower)) <=$(=Max(Upper))"}>} Measure)
Correct Expression:
Sum(If(Category >= Lower and Category <= Upper, Measure))
Script:
Data:
NoConcatenate Load
Ceil(Rand() * 3) as Category,
RangeMin(Res1, Res2) as Lower,
RangeMax(Res1, Res2) as Upper,
1 as Measure;
Load
Ceil(Rand() * 3) as Res1,
Ceil(Rand() * 3) as Res2
AutoGenerate 1000;
thak You very much for your guidiance , you made me to use the if statement and it was just very simple - Avg(
If(
[Collection date] >= AddMonths([Change date], -6) and [Collection date] <= [Change date],
ANB
)
)
and it worked just fine.
cheers