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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
marama
Helper I
Helper I

Matrix showing wrong rows

Hi!

I have a clients / projects / invoices+credits hierarchy arranged in a crossjoin setup and related using a calculated column.
I need to have a measure on crossjoin level to do some DAX calculations (total = invoice - credit).
But the projects row the resulting matrix visual is also showing projects belonging to clients other then shown in client row. I've spent hours trying to figure this out, maybe someone can clarify for the poor novice.

pbix file here:
https://drive.google.com/file/d/1Dc6Hb0O83HwCWSLSmNbIaNscL4egGiJc

Thank you

2 REPLIES 2
Anonymous
Not applicable

Hi @marama ,

 

The problem is in the relationship.

Please check:

1. There must be no NULL or Blank values in Table 1 (From Column) of the relationship

2. Every Value in Table 1(From Column) must have corresponding value in Table 2(To Column) of the relationship.

Power BI is not going to throw you an error if referential integrity is screwed in your data-set, instead you will get inconsistencies in results.

 

So table 'crossjoin_month_projects':

 

crossjoin_month_projects =
CROSSJOIN (
    SELECTCOLUMNS ( months, "month", [month] ),
    FILTER ( projects, projects[client] <> BLANK () )
)

vcgaomsft_0-1663125862796.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

 

Thank you, but it's not working. It still shows all the projects. I believe inconsistency comes from the measure (maybe blanks in the measure), not the blanks in the crossjoineed table. If I remove the measure from matrix and include the values, that in works. But if I include the measure in the matrix, then it breaks.

This is my measure:

total = SUM(invoices[amount invoice]) - SUM(credit[amount credit])

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors