Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
PFA.
I have 4 expressions in a chart
as per requirement I Need to show data only for even years for expression 4
Can you please suggest how shall i go ahead.
Thanks
Try :
=(Avg({<INDICATOR_NAME={'Sum of Attributions (Growth)'},QUARTER={'Q4'},YEAR={"=Even(YEAR)"}>}INDICATOR_VALUE))/100
Hi Deepak
This is not the most elegant solutions, but you can flag the even years like this, and then use the flag i the set analysis.
Test:
LOAD * INLINE [
YEAR
1902
1903
1904
1905
];
join
Load
YEAR,
Right(YEAR/2, 2) as Test,
IF( Right(YEAR/2, 2) = '.5', 0, 1 ) as _EvenFlag
Resident Test;
/Teis
Hi Deepak,
Write the following expression for 4
IF(mod(YEAR,2)=0,(Avg({<INDICATOR_NAME={'Sum of Attributions (Growth)'},QUARTER {'Q4'}>}INDICATOR_VALUE))/100,)
See the attached file
Thanks,
Partha K
Try :
=(Avg({<INDICATOR_NAME={'Sum of Attributions (Growth)'},QUARTER={'Q4'},YEAR={"=Even(YEAR)"}>}INDICATOR_VALUE))/100
EDIT: Sorry didn't see TeisWamsler suggestion. Deepak, That's the solution I'm referring to.
I think it would be good to identify a year as even or odd at the script level.
While loading data check if the YEAR is even (by using even function) and then flag it as 1 and rest all years as 0 and bring this flag as a new field.
In your expression you can use this flag to restrict the output to only even years.