Forum Discussion
Anonymous
6 years agoNot applicable
What's wrong with my IF statement?
I have a report table with data grouped by Contract number. I tried creating a New Column that should contain the value of CurrEstCost if ProjCost equals zero, else it will contain the ProjCost numb...
- 6 years ago
What I can see from your formula is a new column. Columns are precompoded at the row level (that is, by line level).
You can test a measure, but remember to visual display row context.
Medida: if(sum(backlog[prjcost])-0,sum(backlog[currEstcost]),sum(backlog[prjcost]))
See also
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
tkirilov
6 years agoResolver I
Hi Anonymous ,
I'm not sure what causes that kind of behaviour in your calculated column, but I would recommend that for a task like that you use the Add conditional column facility in the Query Editor.
Hope that helps,
Tom