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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

DAX Measure causes Cartesian product in table

Hi all,

 

I'm having trouble understanding why the following happens (and how to prevent it):

 

I have two tables, which I join via a 1:1 relation on a key.

Joining the two tablesJoining the two tablesth

The result after joining is as expected:

Result after joiningResult after joining

 

Now, when we add a measure: Ones = 1 and add this to the table we get a cartesian product of all project names, and a 1 on each row. Does anyone understand why this happens? 

 

Cartesian product resultCartesian product result

 

Thanks! 

-Nils

1 ACCEPTED SOLUTION
tamerj1
Community Champion
Community Champion

@Anonymous 

When you add columns from multiple tables to a visual, Power Bi creates a crossjoin of these columns producing all possible combinations but hideing the non-existing combinations. By returning  a constat as a value you are forcing it to show all the combinations even if they don't exist. 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hey Tamerj1, 

 

Thanks for replying! 

 

If that's the case, how would I then prevent this from happening? Is there any way to detect that it's a non-existing combination (or is there a Power BI setting that let's me always hide non-existing combinations?)

@Anonymous 

You can use

IF ( NOT ISEMPTY ( TableName ), 1 )

Can I ask a follow-up question about your solution, please?

What is TableName?

tamerj1
Community Champion
Community Champion

@chuckbo 

The name of you fact table

tamerj1
Community Champion
Community Champion

@Anonymous 

When you add columns from multiple tables to a visual, Power Bi creates a crossjoin of these columns producing all possible combinations but hideing the non-existing combinations. By returning  a constat as a value you are forcing it to show all the combinations even if they don't exist. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.