Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
in my attachment you can see that the total is not correct
i like to use the if statement because in my real file the formula is very complex.
How are totals calculated in QV? why is the sum not correct?
is use this formula
if
(User_id=1,0,Sum(number))is it also possible to change the sum in avg??
Its the way its aggregating from the dataset.
Try sum(if(user_id=1,0,number))
If you have user_id in the dimension, why do you need to use it in the expression under if condition? May be I am missing what oyu are trying to achieve.
To me seems that if you just put sum(number) in the expression, it will give you what you are looking for.
Its the way its aggregating from the dataset.
Try sum(if(user_id=1,0,number))
thnx this works perfect!
and how about my original if-function?
if (CODA_ASSETBOOK_DEPNSTARTYEAR>year(Now())-1,0,if (CODA_ASSETBOOK_DEPNSTARTYEAR+(CODA_ASSETBOOK_ASSETLIFE/12)>year(Now()),(sum(CODA_ASSETBOOK_COST)-sum(CODA_ASSETBOOK_RESIDVALUEASSET))/((CODA_ASSETBOOK_ASSETLIFE/12)-(if(year(now())-CODA_ASSETBOOK_DEPNSTARTYEAR>(CODA_ASSETBOOK_ASSETLIFE/12), 0, year(now())-CODA_ASSETBOOK_DEPNSTARTYEAR)))
,0))
the last else 0 (,0) is the problem!
What is it returning currently?
this is the result , line with activum COMP0003 has value 0, and the total sum is also 0, so there is a problem
sorry, column 2009 is the column to look at
Is that the only row that is incorrect?
This row is correct, so there has to be a value 0 (zero)
but because there is value 0, the total line (0) is not correct, this is my problem