March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I am modeling a Many to Many Relationship. Detail below, When I try to sum by ShippingCompanyId, I get the same Amount, How would I fix this?? We have a very complicated data mart, and have many of these similar scenarios.
I have attempted changing the many to many relationships, etc
Sample Values:
create table dbo.DimCustomer
(
DimCustomerId int,
PersonName varchar(255)
)
insert into dbo.DimCustomer
values ('1','Joe'),
('2', 'Sally')
create table dbo.DimShippingCompany
(
DimShippingCompanyid int,
ShippingName varchar(255)
)
insert into dbo.DimShippingCompany
values ('1','UPS'),
('2', 'Fedex')
create table dbo.FactShipment
(
FactShipmentId int primary key,
DimCustomerId int,
DimShippingCompany int,
ShipmentQuantity int,
ShipmentTotal numeric(10,2)
)
insert into dbo.FactShipment
values (1,1,1,5,8),
(2,1,1,7,12),
(3,1,2,5,9),
(4,2,1,3,4),
(5,2,2,5,7)
create table dbo.FactOrder
(
FactOrderId int primary key identity(1,1),
DimCustomerId int,
OrderAmount numeric(10,2)
)
insert into dbo.FactOrder
values (1,50),
(1,28),
(2,41)
google this: Power BI multiple Fact Tables
There are a couple of videos on how to set things up when you use multiple fact tables.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
115 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
167 | |
117 | |
63 | |
57 | |
50 |