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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Good afterNoon,
I need some advice and help amending the following DAX code. Which flags a 1 for When a new shift starts for every User (UserIndex). I would like to however increment the flag by 1. The Image shows there are four rows of data in this snippet that have the flag of 1 , I want them to increment to say 1 , 2 , 3 , 4 etc...
Thansk for help in advance
@Anonymous , new column. Using the flag you created
Shift Start count =
Countx(
FILTER(
'Shifts',
Shifts[UserIndex] = EARLIER('Shifts'[UserIndex]) && [Shift Start Flag] = 1
Shifts[SharedEndDateTime] <= EARLIER('Shifts'[SharedStartDateTime])
),
'Shifts'[Shift]
)