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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
zabman
Frequent Visitor

DAX Returning thousands of unrelated rows when trying to removefilters

Hi,

 

I have been trying to get my head around some DAX related to Azure DevOps for the past few hours and I am in need of help.

I have got the DAX to return correctly but it also returns hundreds of thousands of rows that I do not expect, and where there is no relationship.

I want the DAX to report the total project hours irrelevent of other filters (except for the project itself)

 

The DAX in question is:

 

 

	MEASURE UserStories_Tickets[HoursCompleted] = 
		SUM(Tasks[CompletedWork])
	
    MEASURE 'Projects'[Total_Hours] = 
		CALCULATE (
			[HoursCompleted] ,
			Projects
			,ALL(Tasks)
			,ALL(Task_Update_Calendar)
		)

 

 

 

When this is presented in a table with fields from Project I get results as expected. But as soon as I add the title from the UserStories_Tickets table I get thousands of rows reporting.

I suspect this is a result of the Auto-Exist behaviour but I cannot resolve it. I have tried what seems like hundreds of different filters in the measure but whenever I get the correct 'hours' at a project level, it also creates the issue with thousands of non related rows.

 

My tables are connected as follows:

zabman_0-1724735168120.png

The calendar is on the Task Revisions because I visualize the data per the week the task hours are updated, which can be split over multiple weeks per task.

 

The result should look like the following

Project[Title]UserStories_Tickets[Title]
Task_Update_Calendar[Year_Week]
UserStories_Tickets[HoursCompleted]
Projects[Total_Hours]
ABC1232023_41714.5
ABC4562023_413.514.5
ABC4562023_42414.5
DEF1232023_4113
DEF4562023_4123
GHI1232023_4188

 

1 ACCEPTED SOLUTION

Use DAXDEBUGOUTPUT and EVALUATEANDLOG to see where it goes wonky.

 

And read that article I linked to.

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

 

MEASURE 'Projects'[Total_Hours] = 
		CALCULATE (
			[HoursCompleted] ,
			Projects
			,ALL(Tasks)
			,ALL(Task_Update_Calendar)
		)

 

 

What's the purpose of including Projects? Not only are you filtering an entire table, but you are filtering  its expanded table too. Filter columns, not tables, in DAX - SQLBI

 

 

Hi - to be completely honest I don't know. This was one of the few ways I was able to get this to give me the correct result. When I remove this, I get memory issues and the dax does not resolve

Use DAXDEBUGOUTPUT and EVALUATEANDLOG to see where it goes wonky.

 

And read that article I linked to.

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.