Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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:
ID | CustomerID | Date | Type |
1 | 1 | 2023-02-01 | Startup |
2 | 2 | 2023-02-01 | Retention |
3 | 3 | 2023-02-01 | Startup |
4 | 2 | 2023-02-05 | Support |
5 | 1 | 2023-02-05 | Adjustment |
What I'm looking for:
ID | CustomerID | Date | Type | Next meeting type |
1 | 1 | 2023-02-01 | Startup | Adjustment |
2 | 2 | 2023-02-01 | Retention | Support |
3 | 3 | 2023-02-01 | Startup | |
4 | 2 | 2023-02-05 | Support | |
5 | 1 | 2023-02-05 | Adjustment |
@sumsar10171 with new DAX OFFSET; PFA
Measure =
CALCULATE (
[__type],
OFFSET (
1,
DISTINCT ( ALL ( tbl ) ),
ORDERBY ( tbl[Date], ASC ),
KEEP,
PARTITIONBY ( tbl[CustomerID] )
)
)
Is it possible to write this as a column?
hi @sumsar10171
try like:
Column =
MINX(
TOPN(
1,
FILTER(
TableName,
TableName[CustomerID] = EARLIER(TableName[CustomerID])
&&TableName[Date] > EARLIER(TableName[Date])
),
TableName[Date],
DESC
),
TableName[Type]
)
it worked like:
It doesn't account for customers with more then two meetings.
In that case it will simply take the type of the latest meeting and apply to all previous meetings
You 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.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
12 | |
10 | |
9 | |
9 |