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 agoHi 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?
- Mouse2 years agoFrequent Visitor
Hi Owen,
Thank you somuch for your reply, I really appreciate it!
Unfortunaely I got this error, which I've seen before in my attempts and I don't understand why.
Here are the outputs I'm trying to filter to, and the blank is (I think) a true blank as it's generated by the "else" of a switch calc that ends with Blank()