- 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
How to get latest value of each day an sum it up
Hi all,
I am struggling with the following issue:
I have a table with values that have been put in the system at some point but might have been altered over time. Not a big deal. But sometimes values are changed several times a day.
Now my question:
How do I extract only the latest value of each day and sum them up with other values for other "Schlüssel" for the same day? What I want in the end is a visual over time showing a cummulation of all values (of each "Schlüssel") per day as daily change over time.
Here is an example:
What i expect for "Schlüssel"=BDAS10119 are only the values 3, 5 and 13 (8 was put in on the same day as 13 but was replaced and should not count) and for BDAS-10191 only 3.
Then I want a visual over time (daily) giving me the sum of those values (There is more data in my original table, so there will be more values for different "Schlüssel" for the same day.)
I was trying out a lot, but nothing gave me the correct outcome.
Any ideas? 🙂
Best regards and thank you!
Jana
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One option is to create a flag using a calculated column:
Is Latest Row =
VAR vSchlussel = 'Table'[Schlüssel]
VAR vDate =
INT ( 'Table'[Timestamp] )
VAR vMaxTimestamp =
CALCULATE (
MAX ( 'Table'[Timestamp] ),
ALL ( 'Table' ),
'Table'[Schlüssel] = vSchlussel,
INT ( 'Table'[Timestamp] ) = vDate
)
VAR vResult =
IF ( 'Table'[Timestamp] = vMaxTimestamp, 1 )
RETURN
vResult
This will enable you to create a measure like this:
Sum Latest Row =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Is Latest Row] = 1 )
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Jaenna ,
You can use the DATEVALUE function to add a date calculation column and then try the following measure.
Measure =
SUMX(
ALL('Table'[Product]),
LASTNONBLANKVALUE('Table'[DateTime],SUM('Table'[Sales]))
)
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Jaenna ,
You can use the DATEVALUE function to add a date calculation column and then try the following measure.
Measure =
SUMX(
ALL('Table'[Product]),
LASTNONBLANKVALUE('Table'[DateTime],SUM('Table'[Sales]))
)
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One option is to create a flag using a calculated column:
Is Latest Row =
VAR vSchlussel = 'Table'[Schlüssel]
VAR vDate =
INT ( 'Table'[Timestamp] )
VAR vMaxTimestamp =
CALCULATE (
MAX ( 'Table'[Timestamp] ),
ALL ( 'Table' ),
'Table'[Schlüssel] = vSchlussel,
INT ( 'Table'[Timestamp] ) = vDate
)
VAR vResult =
IF ( 'Table'[Timestamp] = vMaxTimestamp, 1 )
RETURN
vResult
This will enable you to create a measure like this:
Sum Latest Row =
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Is Latest Row] = 1 )
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!

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 | |
---|---|---|---|
08-20-2024 04:30 AM | |||
08-06-2024 10:49 PM | |||
02-13-2023 04:24 AM | |||
06-23-2023 12:54 AM | |||
04-29-2024 03:37 PM |
User | Count |
---|---|
24 | |
11 | |
10 | |
9 | |
9 |
User | Count |
---|---|
18 | |
14 | |
13 | |
13 | |
12 |