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
N_R_000
Helper I
Helper I

DAX Total does not match sum of rows

Thanks to some help on here, I've progressed but could do with a final bit of help. 

I need to calculate the overall Target for the selected users (users are filtered by Slicer, by team etc). I have the below, but you'll see that the totals at the bottom are not correct for Target. I need to get a total overall target, even if I have to display it in another visual. 

N_R_000_0-1651157086854.png

 

 

Data is in 3 tables: 

A date table

A Users table - single row per user, with a Productivity Target per user.

A table containing orders, the rows are input by each user.

A Schedule Table which confirms if the user was scheduled to work that day, joins to Users on UserID

The Order table sits in the middle, and connects to the Users table by UserID and to the Date table by DateID.

 

The Target is only to be counted (or sum'd) if that user worked that day. 

 

Target Per Person = 

IF ( ISINSCOPE(Person[person_name]), 'DAX Measures'[Target],
var summaryTable = ADDCOLUMNS( SUMMARIZE( Person, Person[person_name]), 
"@val", [Target])
return SUMX( summaryTable, [@val])
)

 

 

 

Target = 'People'[Target]*[CountofWorkedDays]

 

 

Can anyone help me with a measure that would SUM the Targets for staff (if they worked that day)? 

2 REPLIES 2
amitchandak
Super User
Super User

@N_R_000 , Try like

 

Target Per Person =

IF ( ISINSCOPE(Person[person_name]), 'DAX Measures'[Target],
var summaryTable = ADDCOLUMNS( SUMMARIZE( Person, Person[person_name], 'Date'[Date]),
"@val", [Target])
return SUMX( summaryTable, [@val])
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi, thanks for getting in touch - I don't have a Date  column on the Person table though, so the DAX editor is throwing an error. I only have a date column on the Dates table. 

Also - I'm happy if this measure sits in it's own Card visual (doesn't have to be part of the existing Matrix)

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.

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.