Forum Discussion
harshad_barge
6 years agoHelper I
What am I doing wrong?
I am trying to update date in a column where the values are blank .
The DAX is:
Position From (N) =
IF (
ISBLANK ( [Position From Date] ),
LOOKUPVALUE (
Fact_Position[Employee_ID],
Fact_Position[From].[Date], VALUE('Ordinary Hours'[Employee_ID])
),
'Ordinary Hours'[Position From Date].[Date]
)
IF (
ISBLANK ( [Position From Date] ),
LOOKUPVALUE (
Fact_Position[Employee_ID],
Fact_Position[From].[Date], VALUE('Ordinary Hours'[Employee_ID])
),
'Ordinary Hours'[Position From Date].[Date]
)
The logic is if the "Position From Date" is blank, update it from another column from a table " Fact_Position[From].[Date]"
'Ordinary Hours'[Employee_ID] is stored as text hence the value function to convert it to number.
'Ordinary Hours'[Employee_ID] is stored as text hence the value function to convert it to number.
I am getting blank for blank values. What am I doing wrong?
Harshad
3 Replies
- amitchandakSuper User
Try as a new column. Share some sample data for lookup
new column in Fact_Position
Position From (N) = IF (
ISBLANK ( [Position From Date] ),maxx(filter('Ordinary Hours','Ordinary Hours'[Employee_ID]=Fact_Position[Employee_ID]),'Ordinary Hours'[Position From Date]),
[Position From Date]) - Greg_DecklerCommunity Champion
By default, LOOKUPVALUE will return blank if it cannot filter down to a single row.
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
- v-chuncz-msftCommunity Support