Introduction
Whenever you're using the Line Item Dimension, it's encouraged that you generate the Dimension Members using a script similar to the following one. This will ensure the Dimension value, and the order of both the MemberID and MemberLabel, are incremental.
Script
TRUNCATE TABLE [dbo].[HO_LineItem_LineItem]
TRUNCATE TABLE [dbo].[H_LineItem_LineItem]
TRUNCATE TABLE [dbo].[D_LineItem]
SET IDENTITY_INSERT [dbo].[D_LineItem] ON
INSERT INTO [dbo].[D_LineItem]
([MemberId]
,[MemberLabel]
,[MemberName]
,[Input]
,[Annotate])
SELECT
/*
WILL GENERATE 100 LINEITEMS (FROM 1 TO 100);
MODIFY THE AMOUNT AS NEEDED;
*/
TOP 100
[LineID]
,[LineID]
,[LineID]
,1
,0
FROM
(
SELECT
ROW_NUMBER() OVER(ORDER BY
MemberID) [LineID]
FROM [dbo].[D_Time]
) L
SET IDENTITY_INSERT [dbo].[D_LineItem] OFF
INSERT INTO [dbo].[H_LineItem_LineItem]
SELECT MemberId, MemberId
FROM [dbo].[D_LineItem]
INSERT INTO [dbo].[HO_LineItem_LineItem]
SELECT MemberId, MemberId
FROM [dbo].[D_LineItem]