Add initial number plus one, for each category, keeping record

Hi, I have 3 types of evaluations Quiz, Sumative and Diagnostic
When I create a new evaluation a need to put as an initial value, a number for each one, starting by 1 and adding one more for the next same type of evaluation created. For ecample
for the first Quiz evaluation initial value 1, then for the second quiz initial value 2 , then if i create a sumative evaluation it should show 1, and then for the next quiz should contiinue with 3 and so on.

Solved Solved
0 4 164
1 ACCEPTED SOLUTION

It works!.. but i made a mistake, I forgot to mention that besides โ€œtypeโ€ there is also a โ€œsubjectโ€ column.
how could i include both, so that for each --type-subject-- it counts from 1 ++ ?
โ€ฆSolved! i just made a virtual column concatenate([type].[subject]) and then used that virtual column (uniqueTest) in place of [type]

MAX( SELECT(Evaluations[number] , [uniqueTest] = [_THISROW].[type] ) ) + 1

View solution in original post

4 REPLIES 4
Top Labels in this Space