Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
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 take the next number not null.
Number | order | Next_number |
1,32 | 1 | 2,3 |
2,3 | 2 | 0.9 |
0,9 | 3 | 0,5 |
0 | 4 | 0,5 |
0 | 5 | 0,5 |
0,5 | 6 | 69 |
69 | 7 |
Please l need help.
Solved! Go to Solution.
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] )
it gives the value of next row. but when the next value of number is "0" it is supposed to skip it bcause it is null and use the next value of number not null.
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] )
Hi,
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] )
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
6 | |
4 | |
3 | |
3 |
User | Count |
---|---|
13 | |
11 | |
8 | |
8 | |
8 |