Forum Discussion
Anonymous
4 years agoNot applicable
Create a column based on index value in another column
l have a table which contains 2 columns: number and order. l need a column "next_number" . l want to have the value of next row of the column number sort by order. when the next number is null, we ...
- 4 years ago
Hi,
Thank you for your feedback, and sorry that I missed your requirement.
Could you please check if the below and the attached pibx file are providing a correct result?
Next number CC = VAR nextorder = MINX ( FILTER ( Data, Data[order] > EARLIER ( Data[order] ) && Data[Number] <> 0 ), Data[order] ) RETURN MAXX ( FILTER ( Data, Data[order] = nextorder ), Data[Number] )
Jihwan_Kim
Super User
4 years agoHi,
Please check the below picture and the attached pbix file.
It is for creating a new column.
Next number CC =
VAR nextorder =
MINX ( FILTER ( Data, Data[order] > EARLIER ( Data[order] ) ), Data[order] )
RETURN
MAXX ( FILTER ( Data, Data[order] = nextorder ), Data[Number] )