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.
Solved! Go to Solution.
Hi @cz1750,
Sorry for the delay.
Yes, if you got a sequence column, it will be better for the ordering. Please refer to following sample:
The source data in Excel is like:
After loading it into Power BI, it displays as:
Not the right sequence
Then you can use following calculated column to verify the previous value.
Previous Value =
CALCULATE (
MAX ( Sheet1[id] ),
FILTER (
ALL ( Sheet1 ),
Sheet1[Ordering]
= EARLIER ( Sheet1[Ordering] ) - 1
&& Sheet1[Grouping] = EARLIER ( Sheet1[Grouping] )
)
)
As you can see, even though the ordering is not right. The previous value is still returning the expected result.
Thanks,
Xi Jin.
Hi @cz1750,
Why did you need to this?
Sometimes when load data from excel to Power BI. The source may be ordered by other columns like text strings or other columns. It doesn't mean this is wrong. We just can't define a default order for the source for now when loading data. And if you have a numerical column like Id, you can simply re-order the source based on this Id column.
I don't think it is necessary to do the validation.
Thanks,
Xi Jin.
Hi,
Thanks for your reply
The reason I need to ensure that the ids are i n order is that there are wightings applied to item 1,2,3,4 etc - so if the ids arein in order it means they applied the wrong weighting to the item
i.e.
correct data where the ids are in the correct order and the relevant weighting is correct thats applied to it
id weighting
1 <weighting 1st item>
2 <weighting 2nd item>
4 <weighting 3rd item>
7 <weighting 4th item >
But if an id is entered in te wrong order then the wrong weighting is being recorded/applied to it (for id 4 and 3 below - they will bother result in having the wrong weighting applied due to the bein entered in the wrong order)
id weighting
1 <weighting 1st item>
4 <weighting 2nd item>
2 <weighting 3rd item>
7 <weighting 4th item >
Thanks
J
Hi,
To mkae the ordering better i have added a copumn callled grouping to group associated valuse and a Ordering column to specify what was entered 1st, 2nd, 3rd and 4th
Grouping id Ordering weighting
Group1 1 1 <weighting 1st item>
Group1 2 2 <weighting 2nd item>
Group1 4 3 <weighting 3rd item>
Group1 7 4 <weighting 4th item >
Group2 1 1 <weighting 1st item>
Group2 2 2 <weighting 2nd item>
Group2 7 3 <weighting 3rd item>
Group2 10 4 <weighting 4th item >
So the previous values would be set as follows
Grouping id Ordering weighting Previous Value
Group1 1 1 <weighting 1st item> NULL
Group1 2 2 <weighting 2nd item> 1
Group1 4 3 <weighting 3rd item> 2
Group1 7 4 <weighting 4th item > 4
Group2 1 1 <weighting 1st item> NULL
Group2 2 2 <weighting 2nd item> 1
Group2 7 3 <weighting 3rd item> 2
Group2 10 4 <weighting 4th item > 7
Thanks
J
Hi @cz1750,
Sorry for the delay.
Yes, if you got a sequence column, it will be better for the ordering. Please refer to following sample:
The source data in Excel is like:
After loading it into Power BI, it displays as:
Not the right sequence
Then you can use following calculated column to verify the previous value.
Previous Value =
CALCULATE (
MAX ( Sheet1[id] ),
FILTER (
ALL ( Sheet1 ),
Sheet1[Ordering]
= EARLIER ( Sheet1[Ordering] ) - 1
&& Sheet1[Grouping] = EARLIER ( Sheet1[Grouping] )
)
)
As you can see, even though the ordering is not right. The previous value is still returning the expected result.
Thanks,
Xi Jin.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 77 | |
| 37 | |
| 31 | |
| 29 | |
| 26 |