Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
I also tried to add only 1 row and it didnt work. I also tried
CREATE TABLE [GoldWH_SalesOrder].[datamart_salesOrder].[dimProduct]
(
ind int NOT NULL,
Item VARCHAR(6000) NULL,
UnitPrice REAL,
ValidFrom date,
validUntil date
)
GO
ALTER TABLE [GoldWH_SalesOrder].[datamart_salesOrder].[dimProduct] ADD CONSTRAINT PK_product PRIMARY KEY NONCLUSTERED (ind) NOT ENFORCED;
INSERT INTO [GoldWH_SalesOrder].[datamart_salesOrder].[dimProduct]
( Item, UnitPrice, ValidFrom, validUntil)
SELECT Item, UnitPrice, ValidFrom, ValidUntil
from [SilverWH_salesorder].[dbo].[scd2_product_view]
where Item is not NULL and UnitPrice is not NULL and ValidFrom is not NULL and ValidUntil is not NULL
Cannot insert the value NULL into column 'Item', table 'dimProduct'; column does not allow nulls. INSERT fails.
Solved! Go to Solution.
Hi @ranoren ,
Can you try this and let me know the results?
INSERT INTO [GoldWH_SalesOrder].[datamart_salesOrder].[dimProduct]
(ind, Item, UnitPrice, ValidFrom, validUntil)
SELECT 1, Item, UnitPrice, ValidFrom, validUntil
from [SilverWH_salesorder].[dbo].[scd2_product_view]
where Item is not NULL and UnitPrice is not NULL and ValidFrom is not NULL and validUntil is not NULL;
It works fine in my case.
The problem should be with the ind column, which is set to not null but does not have any value when inserted.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi @ranoren ,
Can you try this and let me know the results?
INSERT INTO [GoldWH_SalesOrder].[datamart_salesOrder].[dimProduct]
(ind, Item, UnitPrice, ValidFrom, validUntil)
SELECT 1, Item, UnitPrice, ValidFrom, validUntil
from [SilverWH_salesorder].[dbo].[scd2_product_view]
where Item is not NULL and UnitPrice is not NULL and ValidFrom is not NULL and validUntil is not NULL;
It works fine in my case.
The problem should be with the ind column, which is set to not null but does not have any value when inserted.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Fabric update to learn about new features.
User | Count |
---|---|
6 | |
4 | |
3 | |
3 | |
3 |