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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
JollyRoger01
Helper III
Helper III

Excel - How to replace the RELATEDTABLE function where many-to-many rel. are not allowed

Hi,

 

I am using Excel 2016 and I have two tables in my data model. Within one table, I am trying to do a DAX calculation where one of the conditions is that the column value in both tables are the same, basically an INDEX MATCH within a COUNTIF. The problem is, these column values are not unique in either table (many-to-many relationship). I can do the Excel formula quite easily (which can be found in the Desired Output sheet), I just want to replicate it in DAX.

 

I have tried the following, but it won't work as I don't have a related table. I would like to use the same structure if possible and replace the RELATEDTABLE function with something else so I can follow the logic. Would someone please be able to have a look at my Excel file and let me know what I need to use for this?

= 
IF(
	[Resource] = "SME1",
		CALCULATE(
					COUNTROWS(Table_Rev),
		    			FILTER(
						    	Table_Rev,
		    						Table_Rev[SME1 Rem]=0
		    						&&
		    						Table_Rev[Consolidate]=FALSE() 		
							),
					RELATEDTABLE(Table_Rev)
					)
	,0)

 

Excel file 

 

1 REPLY 1
lbendlin
Super User
Super User

Does your Excel DAX support the INTERSECT function?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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