Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The 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.

Reply
Manguirish
New Member

Many to Many Modelling - Qlik v/s Power BI -Power BI shows correct aggregation but misses detail row

I have a many to many model in Power BI based on following sample tables

Ord Table

KeyOrdPOOrdPOProductQty
1|111Q1100
1|111Q2500
1|212Q150

 

Cost Table

KeyOrdPOChargeTypeCost
1|1Shipping100
1|1Packing200


The model here is a many-to-many bidirectional Model

Manguirish_1-1739541061452.png

 



When I do a table visual in power BI, I get the following result

Manguirish_0-1739540888568.png


Even if i create a Bridge Table with KeyOrdPO, and model this the resultant visual is exactly same

Manguirish_2-1739541196535.png


However, when the exact same scenario is replicated in QlikSense, the model looks like this

Manguirish_3-1739541323612.png

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

Manguirish_5-1739541544822.png

 

 

So Question - How do i get this right in power BI.




2 REPLIES 2
MarkLaf
Solution Sage
Solution Sage

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

KeyOrdPOChargeTypeCost
1|1Shipping100
1|1Packing200
1|2-null

 

If you load this as your Cost table, I believe your original M2M model (no bridge) should work as expected:

MarkLaf_0-1739603344875.png

lbendlin
Super User
Super User

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".

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors