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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all!
I have a huge table that shows me for each order and each process step the value:
Date | Order | Process Step | Status | Value |
01.01.2022 | A1 | First | Started | 50 |
01.01.2022 | A1 | First | In Progress | 40 |
01.01.2022 | A1 | First | Finished | 25 |
01.01.2022 | A2 | First | Started | 50 |
For each process step exists 3 different status:
How I would like to sum up column value for each order based on the last entry.
How is this possible?
Hi @joshua1990 ,
What does "last entry" mean, [Status] = "Finished"?
Please share more details.
Best Regards,
Jay
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
I suggest having an index column for the Status column. And then I could select which status is the last status for each date, order, and process step.
Please check the below picture and the attached pbix file.
Sum only last status value per order per day: =
VAR _newtable =
SUMMARIZE (
Data,
Data[Date],
'Order'[Order],
'Process Step'[Process Step],
'Status'[Index]
)
VAR _laststatusonly =
GROUPBY (
_newtable,
Data[Date],
'Order'[Order],
'Process Step'[Process Step],
"@laststatusindex", MAXX ( CURRENTGROUP (), 'Status'[Index] )
)
RETURN
CALCULATE (
SUM ( Data[Value] ),
TREATAS (
_laststatusonly,
'Calendar'[Date],
'Order'[Order],
'Process Step'[Process Step],
'Status'[Index]
)
)