Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I have a many to many model in Power BI based on following sample tables
Ord Table
KeyOrdPO | Ord | PO | Product | Qty |
1|1 | 1 | 1 | Q1 | 100 |
1|1 | 1 | 1 | Q2 | 500 |
1|2 | 1 | 2 | Q1 | 50 |
Cost Table
KeyOrdPO | ChargeType | Cost |
1|1 | Shipping | 100 |
1|1 | Packing | 200 |
The model here is a many-to-many bidirectional Model
When I do a table visual in power BI, I get the following result
Even if i create a Bridge Table with KeyOrdPO, and model this the resultant visual is exactly same
However, when the exact same scenario is replicated in QlikSense, the model looks like this
The Qlik engine by default creates a bi-directional many to many model on common keycoloumn which is indexed in the memory - the so called tenet of Associative Model of Qlik
The resultant visual looks like this which clearly shows the allocation of Qty-50 belongs to Q1 and doesnt have any corrosponding ChargeType. However, in power BI this row is missing in the visual even though the aggregation is correct. This presents a confusing scenario
So Question - How do i get this right in power BI.
You can try to add in rows to Cost for any missing KeyOrdPO from Ord. Here is a Power Query solution, where Cost_Original and Ord are the table you start with in your OP:
let
Source = Cost_Original,
Missing = List.Difference( List.Distinct( Ord[KeyOrdPO] ), List.Distinct( Source[KeyOrdPO] ) ),
MissingToRows = List.Transform( Missing, each { _, "-", null } ),
MissingToTable = Table.FromRows( MissingToRows, Value.Type( Source ) ),
Cost_Combined = Table.Combine( { Source, MissingToTable } )
in
Cost_Combined
This gives you:
Cost
KeyOrdPO | ChargeType | Cost |
1|1 | Shipping | 100 |
1|1 | Packing | 200 |
1|2 | - | null |
If you load this as your Cost table, I believe your original M2M model (no bridge) should work as expected:
You are absolutely correct - the associative model is the USP (UNIQUE selling point) of Qlik. Power BI on the other hand is based on the Star Schema mentality.
If you need many to many relationships, stay with Qlik.
In Power BI, enable "show items with no data" and read about "Auto Exist".
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
81 | |
53 | |
37 | |
35 |