Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I created a qvw and on the expressions I have multiple IF statements in order to calculate the data as shown on the attached picture.
The problem is that when I ask for partial Sums on pivot table or totals on straight table, the totals are wrong.
What I am loosing?
expression eg. :
IF((PLAN_START_YEAR_MONTH-YEAR_MONTH)=0,sum(PLResult_EndFishNo),
IF((Sum(PLResult_EndFishNo)=0),sum(COSTMAIN_EndFishNo),(Sum(PLResult_EndFishNo)))).
The first IF statement is applied on the 8th month .
This is the correct syntax.
SUM(AGGR((IF((PLAN_START_YEAR_MONTH-YEAR_MONTH)<=0,SUM(PLResult_EndFishNo),
IF((PLAN_START_YEAR_MONTH-YEAR_MONTH)>0,SUM(COSTMAIN_EndFishNo)))),THEYEAR,THEMONTH))
This is the correct syntax.
SUM(AGGR((IF((PLAN_START_YEAR_MONTH-YEAR_MONTH)<=0,SUM(PLResult_EndFishNo),
IF((PLAN_START_YEAR_MONTH-YEAR_MONTH)>0,SUM(COSTMAIN_EndFishNo)))),THEYEAR,THEMONTH))
Try this: sum(aggr( ...original expression here ... , YEAR, MONTH))
in stright table ,
Goto expression table and select Sum o Row,
I guess u ll get solution
If not try to share sample data to get better solution
-Nagarjun
Try wraping it with Sum(Aggr(...., YEAR, MONTH))
Sum(Aggr(
IF((PLAN_START_YEAR_MONTH-YEAR_MONTH)=0,sum(PLResult_EndFishNo),
IF((Sum(PLResult_EndFishNo)=0),sum(COSTMAIN_EndFishNo),(Sum(PLResult_EndFishNo))))
, YEAR, MONTH))
I tried this from the beginning.It is wrong due to different fields that must be aggregated.