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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.