- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SUM DAX Query on condition
I have a table with shipment number and dates. Need to calculate the Total backlog of that shipment and consider the latest date value and sum the column.
Shipment | Date | Backlog | Result(required) |
AX | 28/10/2022 | 28000 | 0 |
AX | 29/10/2022 | 0 | 0 |
BX | 28/10/2022 | 1400 | 0 |
BX | 29/10/2022 | 0 | 0 |

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @insandur ,
Does that make sense? If so, kindly mark my answer as the solution to close the case please. If it does not , please share your ways. Thanks in advance.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @insandur ,
I have created a simple sample, please refer to it to see if it helps you.
Create 2 measures.
Measure =
CALCULATE (
SUM ( 'Table'[Backlog] ),
FILTER (
ALL ( 'Table' ),
'Table'[Shipment] = SELECTEDVALUE ( 'Table'[Shipment] )
)
)
Measure2 =
VAR _maxdate =
MAXX ( ALL ( 'Table' ), 'Table'[Date] )
RETURN
CALCULATE (
SUM ( 'Table'[Backlog] ),
FILTER ( ALL ( 'Table' ), 'Table'[Date] = _maxdate )
)
If I have misunderstood your meaning, please provide more details with your desired output.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Polly,
Thanks for the solution, Backlog in my table is actually a meausre not a column so i am not able to get the correct ans.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @insandur ,
I have modified the answer. Please refer to it to see if it helps you.
Measure = SUMX(FILTER(ALL('Table'),'Table'[Shipment]=SELECTEDVALUE('Table'[Shipment])),[Mbacklog])
Measure2 =
VAR _maxdate =
MAXX ( ALL ( 'Table' ), 'Table'[Date] )
RETURN
SUMX(
FILTER ( ALL ( 'Table' ), 'Table'[Date] = _maxdate )
,[Mbacklog])
The [Mbacklog] is also a measure.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks again, But i dont get the desired ans😐 Please see the screenshots
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @insandur ,
There is nothing error with the measure. In my pbix file, it works well. How the [Backlog2] calculates? Could you please provide your pbix file without privacy information for us testing?
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@insandur Edit the question and add a column for the desired result with detailed explanation.

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
11-01-2023 07:06 AM | |||
06-24-2024 06:10 PM | |||
09-05-2024 10:50 AM | |||
08-26-2024 02:49 AM | |||
07-05-2024 08:35 AM |
User | Count |
---|---|
24 | |
12 | |
10 | |
9 | |
9 |
User | Count |
---|---|
17 | |
16 | |
13 | |
11 | |
11 |