Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Please see below image, Total column calculate 0 (ZERO) against some branches. Which is wrong, it suppose to give me total.
My Expression is below
if(vFromDate >= Sdate1,sum({<T_Date= {'>=$(vFromDate) <=$(vToDate)'} >}Tday),
aggr(sum(if(T_Date>=Sdate1 and T_Date <= vToDate ,Tday)), DECDDT1,Sdate1, Branch, [Branch Name],[RSM Name]))
Is anything wrong/modify in expression?
I guess you neet to put the whole expression in an additional sum
if(vFromDate >= Sdate1,sum({<T_Date= {'>=$(vFromDate) <=$(vToDate)'} >}Tday),
SUM(aggr(sum(if(T_Date>=Sdate1 and T_Date <= vToDate ,Tday)), DECDDT1,Sdate1, Branch, [Branch Name],[RSM Name])))
I have done this but now total is coming up complete wrong.
see below
as far as I see the total column shows the sum of the last three columns. what do you expect as result?
ok now I see your problem.
you can try this
f(vFromDate >= Sdate1,sum({<T_Date= {'>=$(vFromDate) <=$(vToDate)'} >}Tday),
SUM(distinct aggr(sum(if(T_Date>=Sdate1 and T_Date <= vToDate ,Tday)), DECDDT1,Sdate1, Branch, [Branch Name],[RSM Name])))
or you can do it with dimensionality / secondary dimensionality function
What ever that data by Month is correct but total is wrong for example...
Branch no 180 total should be 46(19+22+5) and so on for other branches.
can you upload sample data?
Hi
Try to add to start the expression sum() :
sum(
if(vFromDate >= Sdate1,sum({<T_Date= {'>=$(vFromDate) <=$(vToDate)'} >}Tday),
aggr(sum(if(T_Date>=Sdate1 and T_Date <= vToDate ,Tday)), DECDDT1,Sdate1, Branch, [Branch Name],[RSM Name]))
)
Now working. No data comes up.
I can't provide sample data because its linked with other 10 tables.
I have notice that data is correct by month but total is wrong only when if T_Date>=Sdate1.
Vinay