Forum Discussion
Anonymous
7 years agoNot applicable
simplify code
Hello. I have this new column "line Seperation" coded to get me an increnmenting number that coresponds to a line EX. three rows if data might correspond to #1 and the next 5 rows to #2 . My main q...
- 7 years ago
How about this:
Column = Table1[ID] & Table1[TestCondition2]
Column 2 = RANKX(Table1, Table1[Column], , ASC, Dense)
Anonymous
7 years agoNot applicable
Collin-
See if this is what you had in mind:
1) Created a new column that combined your ID and TestCondtion2 Columns. I did this in Power Query, but could also do in a calculated column.
2) Used the following caclulated column to get the "Line Seperation":
New Line Seperation =
VAR CurrentIDTest = Table2[ID TestCondition2]
RETURN
CALCULATE(
DISTINCTCOUNT( Table2[ID TestCondition2]),
FILTER(
ALL ( TABLE2 ),
CurrentIDTest > Table2[ID TestCondition2]
)
)which I believe matches your output you were looking for: