Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
I feel this should be easy, but I have not been able to write a measure that accomplishes it how I need it to.
To explain, here is an example table of how my data looks:
| Job | Order Date | Create Date | Amount |
| 1 | 1/1/2024 | 2/2023 | 54,500 |
| 2 | 1/1/2024 | 2/2023 | 68,400 |
| 1 | 1/1/2024 | 2/2023 | 54,500 |
| 2 | 1/1/2024 | 2/2023 | 68,400 |
I need to write a measure that would take the above table and sum the amount column only for each distinct job. In this example this would be 54,500 + 68400. The other part of the specifications here is this must be wrapped in a calculation function so I can use:
Solved! Go to Solution.
Try this measure:
Sum Distinct Amount =
VAR vTable =
SUMMARIZE ( Test, Test[Job], Test[Amount] )
VAR vResult =
CALCULATE (
SUMX ( vTable, Test[Amount] ),
USERELATIONSHIP ( Test[CreateDate], 'Date Table'[Date] )
)
RETURN
vResult
Proud to be a Super User!
Try this measure:
Sum Distinct Amount =
VAR vTable =
SUMMARIZE ( Test, Test[Job], Test[Amount] )
VAR vResult =
CALCULATE (
SUMX ( vTable, Test[Amount] ),
USERELATIONSHIP ( Test[CreateDate], 'Date Table'[Date] )
)
RETURN
vResult
Proud to be a Super User!
Hi thank you, that seems to be working somewhat. I am having an issue where the date slicers (which are hooked up to a different column than the create date) are not properly filtering these values as they should and are filtering them based on the wrong date field. I have used UseRelationship many times so not sure why it is not functioning as intended. But I can see in the table when testing that it is only including one line for the amount per job so I will mark your answer as the solution. I just need to troubleshoot this date issue next.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 42 | |
| 39 | |
| 23 | |
| 21 |
| User | Count |
|---|---|
| 144 | |
| 106 | |
| 63 | |
| 38 | |
| 31 |