previous rows
1 TopicConditional Index column in DAX
Hello, I need to create a new index column based on values from previous rows and I would appreciate some help here. This is an example of the type of data we have. We don't have access to the data source, so in that case Power Query is not an option and only DAX should be used: date_column code Name numdays ID 01-Jan-22 John 0 02-Jan-22 John 1 ID1 03-Jan-22 John 2 ID1 04-Jan-22 John 3 ID1 05-Jan-22 A John 0 07-Jan-22 John 1 ID2 07-Jan-22 John 2 ID2 07-Jan-22 Mark 1 ID3 08-Jan-22 Mark 2 ID3 09-Jan-22 Mark 0 12-Jan-22 Mark 1 ID4 First 4 columns are already created and I would like to create a new ID column based on the following: - A new ID value should be created for each user starting on numday = 1. - The same ID should be used for the following consecutive days for the same user as long as the code is not a specific value (A) or numdays is not 0. Thanks.Solved1.8KViews0likes4Comments