Expression having sum of few avg based on where clause
Hi Experts,
Please find below few sample records:
Year
String
Subfield(String,'-',5)
Ratio
2007
2007-Q1-3-4-YR1
YR1
2
2007
2007-Q1-2-4-YR1
YR1
3
2007
2007-Q1-2-5-YR2
YR2
4
2007
2007-Q1-7-4-YR3
YR3
1
2007
2007-Q1-2-5-YR3
YR3
2
2007
2007-Q1-9-4-YR2
YR2
5
Now I need to calculate the following:
= sum of (avg(ratio) where Subfield(CFYStr,'-',5)='YR1' + avg(ratio) where Subfield(CFYStr,'-',5)='YR2' +avg(ratio) where Subfield(CFYStr,'-',5)='YR3' )
I need this in the expression of a line chart. I am not able to do this.