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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Marta777
Frequent Visitor

I have two tables with one to many relationship, what matrix shows depends on ....

I tried Googling but could not find an answer. I have two tables with one 1-to-many relationship (cost centres), what the matrix visual shows depends on whether I filter on cost centre in one table or the other.

 

Marta777_0-1689091476312.pngMarta777_1-1689091547858.png

Marta777_2-1689091608456.png

I have created two measures M1 and M2, with differences marked in red:

M1 = CALCULATE(
        SUM('Transactions'[Amount]),
        LEFT('Tag'[CostCentre],1)="R",
        'Transactions'[Account]>=3000 && 'Transactions'[Account]<9000,
        'Tag'[Tag]="U",
        Transactions[FY]="22/23"
)
M2 = CALCULATE(
        SUM('Transactions'[Amount]),
        LEFT('Transactions'[CostCentre],1)="R",
        'Transactions'[Account]>=3000 && 'Transactions'[Account]<9000,
        'Tag'[Tag]="U",
        Transactions[FY]="22/23"
)
 
M1 shows the correct totals
Marta777_3-1689091979828.png

M2 shows A*,P* and R003 cost centres which should be excluded and incorrect totals for R001 and R002.

Marta777_4-1689092239654.png

 

Q1: Please explain why different results are produced even though my tables have only one 1-to-many relationship?

Q2: How M1 needs to be amended so that it shows the correct totals on the account lines? Currently, it shows as below. Please note that account 9000 should be excluded.

Marta777_5-1689092347649.png

 

 Thank you!

 

 

 

 

 

 

1 ACCEPTED SOLUTION
some_bih
Super User
Super User

Hi @Marta777 as you analysing results per CostCenter, I would suggest to check data about it. 

Are all cost centers values, present in both tables? So basically check  'Transactions'[CostCentre] vs 'Tag'[CostCentre]

 

Did I answer your question? Mark my post as a solution! Kudos Appreciated!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






View solution in original post

2 REPLIES 2
some_bih
Super User
Super User

Hi @Marta777 as you analysing results per CostCenter, I would suggest to check data about it. 

Are all cost centers values, present in both tables? So basically check  'Transactions'[CostCentre] vs 'Tag'[CostCentre]

 

Did I answer your question? Mark my post as a solution! Kudos Appreciated!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Hi @some_bih , yes, all cost centre values are present in both tables. I only showed an extract from the 'Transactions' table to show how it is structured. The 'Transactions' table has all six cost centres with various accounts and amounts.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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