Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, i'm trying to calculate the sum values over the sum of sales. So far i managed to divide it properly but only on totals, som how it doesn't assume the collumn filter. It must be missing something in my formula.
if(isnull(Sum(CBL_ValorT)) or Sum(CBL_ValorT)=0, 0, num(fabs(Sum(CBL_ValorT))/Sum({<Group1={"0.*"}>}CBL_ValorT), '#.##0,0%'))
it's returning this,
but it should return this.
i know this is because is dividing over the total and not over the column, but i can't get to it.
thks in advance.
Or you might need to add your first dimension within the total qualifier
If(IsNull(Sum(CBL_ValorT)) or Sum(CBL_ValorT) = 0, 0, Num(fabs(Sum(CBL_ValorT))/Sum({<Group1={"0.*"}>}TOTAL <1stDimensionHere> CBL_ValorT), '#.##0,0%'))
Replace the 1stDimensionHere with the field name which contain RG because this will ensure that you divide by the 0. value of that particular 1st dimension....
See if adding Total calculates the number you need:
if(isnull(Sum(CBL_ValorT)) or Sum(CBL_ValorT)=0, 0, num(fabs(Sum(CBL_ValorT))/Sum({<Group1={"0.*"}>}Total CBL_ValorT), '#.##0,0%'))
Or you might need to add your first dimension within the total qualifier
If(IsNull(Sum(CBL_ValorT)) or Sum(CBL_ValorT) = 0, 0, Num(fabs(Sum(CBL_ValorT))/Sum({<Group1={"0.*"}>}TOTAL <1stDimensionHere> CBL_ValorT), '#.##0,0%'))
Replace the 1stDimensionHere with the field name which contain RG because this will ensure that you divide by the 0. value of that particular 1st dimension....
Thank you, that really solve it. Now it presents the weight over the each shop sales.