Forum Discussion
IF to select a column value
- Anonymous10 years agoNot applicable
praveen_k I'm assuming you want to keep the measure column. And my other assumption is that you want to keep the measure if the value is greater than or equal to zero, and everything that is under should be the ID. Here is a calc column that will work for what you are asking. If this is not accurate, please clarify the discription.
Value = IF('table'[measure] >= 0, 'table'[measure], 'table'[id])
- Neuro8110 years agoHelper I
Hi Anonymous
Just a quick note on your formula regarding best practise
we should avoid putting the Table name next to the measure
ref: top 5 best practise tips
praveen_kAs Eno suggested your calc column should work, but I'd suggest appending the result with something so that the reader knows that the value returned is either the Id or the result of a mesaure- Anonymous10 years agoNot applicable
Neuro81 Thanks for pointing that out. I just used the quick defaults on this one, but I typically have been referencing my calculated columns the same as normal columns (with table name), and measures as the only outlier (no table name). Must have mis-read this in my reading.