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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Applicable88
Impactful Individual
Impactful Individual

Filtered table different value when put in slicer

Hello,

 

i have a fact table and a material table, which unfortunately are connected via a m:n relationship:

 

Factable:

OrderDateTypeStatusCategory Material
1234501.01.20215LLDLVRManuZZZ
1234602.01.20218ZLDLVRManuZZZ
1234703.01.2021888PRCCManuZZZ
1234804.01.2021888PRCCPlanZZZ
1234905.01.2021888PRCCPlanZZZ
1235006.01.2021888PRCCManuBB
1235107.01.2021888PRCCManuBB

 

I grouped another table which is the materialtable with summarize() and used addcolumn to the sum of Reserve for a material. I grouped to date and material and amount where I got the above table.

Summarized:

Material TotalAmountDateReserve
ZZZ200006.07.202111
ZZZ200006.07.202158
ZZZ200006.07.202133
ZZZ200006.07.202177
LL300007.07.202155
LL300008.07.202144
BB200009.07.202133
BB200010.07.202155

 

I connected the summarized table with the original material table. I can of course connect it with the material column of the facttable as well. They are all connected with m:n anyway.  So far I still would get the same return. I connect them so I can use the standard filter pane of PowerBi to filter only those material I want to look at, like Category must be "Manu" , type must be....

 

The whole purpose was to get the cummulitve sum of Reserve which will be substracted of the total amount:

 
RangeSum = CALCULATE(sum(Summarized[TotalAmount]))-calculate(sum(Summarized[SumOfReserve]), filter(allselected(Summarized), Summarized[Date].[Date] <= max(Summarized[Date])))

 

The confusing thing here is now: When I just drag material, the date and the rangesum measure into a matrix I get really strange numbers. The bold part of the RangeSum function is so big as if nothing was filtered out and I always get minus values.

But strangely setting up a slicer where I can chose directly summarized[material] the numbers got correctly filtered out and also changed. But its actually from the same summarized table. I really dont know why. Why the slicer put it in the right filter context, but by default the matrix showing weird numbers?

 

To double Check I made a dummy Table where I manually put in all the materials of interest and ignore the others. I put this table in between the summarized one and facttable. This time its a 1:n relationship. And it filters out already correctly in the default mode.

What do I have to do to get the summarized table right? 

 

Thank you very much in advance.

Best.

2 ACCEPTED SOLUTIONS
BA_Pete
Super User
Super User

Hi @Applicable88 ,

 

At first glance, this looks like a standard modelling issue. You should be aiming to create a star-schema in your data models, and absolutely SHOULD NOT be using MANY:MANY relationships.

 

Your dimensions (non-numeric identifiers) should be in dimension (dim) tables. Your dim tables, at the very least, should contain a UNIQUE list of your dimensions.

 

For example, a dimMaterial dimension table would look like this:

 

Material

ZZZ

LL

BB

 

A dimCategory table would look like this:

 

Category

MANU

PLAN

 

There's a number of quick and simple ways you can dynamically create these tables from your existing data.

You then relate dimMaterial[Material] to all of your factTable[Material] fields (ONE:MANY), and make sure you use dimMaterial[Material] in any slicers and filters.

 

For dimensions such as [Category] that only exists in one fact table, you will need to find a way to add this field to the fact table that doesn't have it if you want this table to also be filtered when you apply slicers.

This can be done in Power Query either using Merge, or programmatically populating the correct value in a new column based on other identifiers that are available.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

v-yingjl
Community Support
Community Support

Hi @Applicable88 ,

Many-to-many relationship is a week relationship that you have better to prevent it. 

Usually, we create a 'Dim table' or 'Bridge Table' to transfer it to many-to-one relationship.

Relate many-to-many dimensions guidance

When you have a many-to-many relationship between dimension-type tables, we provide the following guidance:

  • Add each many-to-many related entity as a model table, ensuring it has a unique identifier (ID) column
  • Add a bridging table to store associated entities
  • Create one-to-many relationships between the three tables
  • Configure one bi-directional relationship to allow filter propagation to continue to the fact-type tables
  • When it isn't appropriate to have missing ID values, set the Is Nullable property of ID columns to FALSE—data refresh will then fail if missing values are sourced
  • Hide the bridging table (unless it contains additional columns or measures required for reporting)
  • Hide any ID columns that aren't suitable for reporting (for example, when IDs are surrogate keys)
  • If it makes sense to leave an ID column visible, ensure that it's on the "one" slide of the relationship—always hide the "many" side column. It results in the best filter performance.
  • To avoid confusion or misinterpretation, communicate explanations to your report users—you can add descriptions with text boxes or visual header tooltips

We don't recommend you relate many-to-many dimension-type tables directly. This design approach requires configuring a relationship with a many-to-many cardinality. Conceptually it can be achieved, yet it implies that the related columns will contain duplicate values. It's a well-accepted design practice, however, that dimension-type tables have an ID column. Dimension-type tables should always use the ID column as the "one" side of a relationship.

 

Please refer:

  1. Many-to-many relationship guidance 
  2. Many-to-One or Many-to-Many? The Cardinality of Power BI Relationship Demystified 

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @Applicable88 ,

Many-to-many relationship is a week relationship that you have better to prevent it. 

Usually, we create a 'Dim table' or 'Bridge Table' to transfer it to many-to-one relationship.

Relate many-to-many dimensions guidance

When you have a many-to-many relationship between dimension-type tables, we provide the following guidance:

  • Add each many-to-many related entity as a model table, ensuring it has a unique identifier (ID) column
  • Add a bridging table to store associated entities
  • Create one-to-many relationships between the three tables
  • Configure one bi-directional relationship to allow filter propagation to continue to the fact-type tables
  • When it isn't appropriate to have missing ID values, set the Is Nullable property of ID columns to FALSE—data refresh will then fail if missing values are sourced
  • Hide the bridging table (unless it contains additional columns or measures required for reporting)
  • Hide any ID columns that aren't suitable for reporting (for example, when IDs are surrogate keys)
  • If it makes sense to leave an ID column visible, ensure that it's on the "one" slide of the relationship—always hide the "many" side column. It results in the best filter performance.
  • To avoid confusion or misinterpretation, communicate explanations to your report users—you can add descriptions with text boxes or visual header tooltips

We don't recommend you relate many-to-many dimension-type tables directly. This design approach requires configuring a relationship with a many-to-many cardinality. Conceptually it can be achieved, yet it implies that the related columns will contain duplicate values. It's a well-accepted design practice, however, that dimension-type tables have an ID column. Dimension-type tables should always use the ID column as the "one" side of a relationship.

 

Please refer:

  1. Many-to-many relationship guidance 
  2. Many-to-One or Many-to-Many? The Cardinality of Power BI Relationship Demystified 

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

BA_Pete
Super User
Super User

Hi @Applicable88 ,

 

At first glance, this looks like a standard modelling issue. You should be aiming to create a star-schema in your data models, and absolutely SHOULD NOT be using MANY:MANY relationships.

 

Your dimensions (non-numeric identifiers) should be in dimension (dim) tables. Your dim tables, at the very least, should contain a UNIQUE list of your dimensions.

 

For example, a dimMaterial dimension table would look like this:

 

Material

ZZZ

LL

BB

 

A dimCategory table would look like this:

 

Category

MANU

PLAN

 

There's a number of quick and simple ways you can dynamically create these tables from your existing data.

You then relate dimMaterial[Material] to all of your factTable[Material] fields (ONE:MANY), and make sure you use dimMaterial[Material] in any slicers and filters.

 

For dimensions such as [Category] that only exists in one fact table, you will need to find a way to add this field to the fact table that doesn't have it if you want this table to also be filtered when you apply slicers.

This can be done in Power Query either using Merge, or programmatically populating the correct value in a new column based on other identifiers that are available.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors