Forum Discussion
sumsar10171
3 years agoFrequent Visitor
DAX expression for finding the new row for a given customer
Hi, I'm trying to write a dax expression which will give me a new column for my table "meetings". It's suppose to fetch the meeting type for the next meeting for the client. Current table: ...
johnt75
Super User
3 years agoYou can create a column like
Next meeting type =
VAR NextMeeting = OFFSET(
1,
'Table',
ORDERBY( 'Table'[Date], ASC),
PARTITIONBY( 'Table'[CustomerID])
)
VAR MeetingType = SELECTCOLUMNS( NextMeeting, "Type", 'Table'[Type])
RETURN MeetingType
If it complains that there may be duplicate rows you'll need to go into the modelling view, select the table and choose ID as the key column.