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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Total Sum based on a column from other table

Hi, 

 

I have a table with two columns from a dimension table (Company and Project) with a Revenue column coming from the Project Fact Table. Both table are related by Project ID.

 

I wanted to understand why the totals are displayed this way, As it differs from the aggregation totals in SQL.

 

Also when the realtionship changes it does the aggregation total at a company level

-----------------------

One to many relationship (BOTH direction)

 

salabart_2-1626368108646.png

salabart_5-1626368253371.png

 

salabart_1-1626368039800.png

 

 

-----------------------------------------------------------------------------------------------------

One to many relationship (SINGLE direction)

salabart_4-1626368197176.png

salabart_6-1626368354385.png

 

salabart_3-1626368178956.png

 

---------------------------------------------------------------------------------

 

Thanks for your help🙂

 

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

A relationship can be set to be unidirectional – its default behavior – or bidirectional. In a unidirectional relationship the filter context is propagated from the one-side to the many-side, but not the other way around. In other words, in your diagram a filter on Fact Project Revenue automatically filters Dim_LF_project, whereas a filter on Dim_LF_project propagates neither to Fact Project Revenue.

And the presence of that bidirectional cross-filter introduces ambiguity in the model. A model is ambiguous when there are multiple paths between tables. In an ambiguous model, the engine has multiple options when transferring a filter from one table to another. Therefore, it either finds a preferred way to transfer the filter, or it raises an error. In this scenario, no error was raised; therefore, either the model is not ambiguous (small spoiler: IT IS AMBIGUOUS), or the engine found a preferred way to transfer the filter.

To learn more details ,refer:

https://www.sqlbi.com/articles/bidirectional-relationships-and-ambiguity-in-dax/ 

https://docs.microsoft.com/en-us/power-bi/guidance/relationships-bidirectional-filtering 

 

Wish it is helpful for you!

 

Best Regards

Lucien

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

A relationship can be set to be unidirectional – its default behavior – or bidirectional. In a unidirectional relationship the filter context is propagated from the one-side to the many-side, but not the other way around. In other words, in your diagram a filter on Fact Project Revenue automatically filters Dim_LF_project, whereas a filter on Dim_LF_project propagates neither to Fact Project Revenue.

And the presence of that bidirectional cross-filter introduces ambiguity in the model. A model is ambiguous when there are multiple paths between tables. In an ambiguous model, the engine has multiple options when transferring a filter from one table to another. Therefore, it either finds a preferred way to transfer the filter, or it raises an error. In this scenario, no error was raised; therefore, either the model is not ambiguous (small spoiler: IT IS AMBIGUOUS), or the engine found a preferred way to transfer the filter.

To learn more details ,refer:

https://www.sqlbi.com/articles/bidirectional-relationships-and-ambiguity-in-dax/ 

https://docs.microsoft.com/en-us/power-bi/guidance/relationships-bidirectional-filtering 

 

Wish it is helpful for you!

 

Best Regards

Lucien

ntaylo06
Resolver II
Resolver II

Any time you see a column of all of the same number (in your case 7750) it usually means that relationships in your data are either missing or not working properly. In your 4th/5th/6th screenshots your fact table is not able to filter your dimension table, so it simply returns the entire columns value on each row instead of breaking values out into the proper aggregation.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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