BONUS TIP: Sequential Numbering of Line-Items
If you look at the [Order_Name] column on the Orders table, you’ll notice an initial value formula:
concatenate(
"Order #",
count(Orders[OrderID]) + 1
)
This is a very basic way to generate a sequential ID - though I am not using it for the ID, just to generate the Name of the order in a sequential way. (I’m still relying on UNIQUEID() to generate my IDs.)
This demonstrates how simple it can be to implement a sequential numbering system.
If I wanted to include a numbering system for the line items, I would use the following INITIAL VALUE formula:
But you can see how this would get wacky real quick once you rearranged things, added new items, deleted some, etc.
- This is why I didn’t use sequential numbering for the ID, instead I stuck to using
UNIQUEID()to generate a valid 8-character GUID.
Learn more about how to handle sequential keys here:
