Forum Discussion
Mouse
2 years agoFrequent Visitor
Stumped with a calculated column
I want to created a calculated column, not a measure. I need the formula to filter within the table, to aproject, and then return the first nonblank sting from another column in the same table, us...
- 2 years ago
Hi Mouse
Try this:
First Progress = CALCULATE ( FIRSTNONBLANKVALUE ( YourTable[Task Index], SELECTEDVALUE ( YourTable[Progress] ) -- auto context transition from FIRSTNONBLANKVALUE ), ALLEXCEPT ( YourTable, YourTable[ProjectId] ) )The blank values in the Progress column must be genuinely blank (rather than empty strings) for this to work.
Does it work as expected for you?
OwenAuger
Super User
2 years agoThanks for testing that Mouse 🙂
The blank values look good, and the DAX expression itself should be fine as it works in a test model at my end (attached for comparison).
Regarding the error, it looks like the type of the column First Progress might have been set incorrectly.
Can you check that it's set to text?
Alternatively, is there anything else in the query or DAX expression behind this table that might be causing type-related issues?
Mouse
2 years agoFrequent Visitor
omg I'm SUCH a muppet!!! That'll teach me to recycle a column. Owen you are a star. Thank you so very much.