Forum Discussion
gunsmoke125
4 years agoRegular Visitor
Help with getting the most recent non blank value
Hi Community,
I thought this would be quite a simple thing to achieve, but I've been at it for half a day without success.
I have a table with version data
I want to pull the latest non-blank value into table 2. The two tables are related via the GUID column on a 1:* (table 1 is unique, while table 2 has many)
What is the most efficient way to achieve the desired outcome?
Try this calculated column in Table2:
Value = VAR vMaxVersionWithValue = CALCULATE ( MAX ( Table1[Version] ), Table1[Value] <> BLANK () ) VAR vResult = CALCULATE ( MAX ( Table1[Value] ), Table1[Version] = vMaxVersionWithValue ) RETURN vResultData model:
1 Reply
- DataInsights
Super User
Try this calculated column in Table2:
Value = VAR vMaxVersionWithValue = CALCULATE ( MAX ( Table1[Version] ), Table1[Value] <> BLANK () ) VAR vResult = CALCULATE ( MAX ( Table1[Value] ), Table1[Version] = vMaxVersionWithValue ) RETURN vResultData model: