Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Get most recent / last value of the day for each day

We are collecting team progress data every four hours.

In the dashboard we only want to show the latest progress at the time we look at it or for each day.

So in the table below for 25/10/2023 we would only want to see 'AssignedTask' = 44 and 'Unassignedtask' = 7.

That way as the data gets collected throughout the day we would always see the latest figures at any given time.

So if we had looked at the dashboard at 14:00 on 25/10/2023 we would see the values 'AssignedTask' = 46 and 'Unassignedtask' = 9.

 

OMoore_0-1698285437232.png

 

The resulting dash would look something like this, which is not accurate as it is using the Max or Min, not the latests.

OMoore_0-1698285692373.png

 

 

Your help would be greatly appreciated.

Thanks.

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your datamodel.

 

Jihwan_Kim_0-1698288817353.png

 

Assigned task: = 
VAR _latest =
    GROUPBY (
        Data,
        Data[Date],
        "@latest", MAXX ( CURRENTGROUP (), Data[Date Time] )
    )
RETURN
    CALCULATE (
        SUM ( Data[AssignedTask] ),
        TREATAS ( _latest, Data[Date], Data[Date Time] )
    )

 

 

Unassigned task: = 
VAR _latest =
    GROUPBY (
        Data,
        Data[Date],
        "@latest", MAXX ( CURRENTGROUP (), Data[Date Time] )
    )
RETURN
    CALCULATE (
        SUM ( Data[UnassignedTsk] ),
        TREATAS ( _latest, Data[Date], Data[Date Time] )
    )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

4 REPLIES 4
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your datamodel.

 

Jihwan_Kim_0-1698288817353.png

 

Assigned task: = 
VAR _latest =
    GROUPBY (
        Data,
        Data[Date],
        "@latest", MAXX ( CURRENTGROUP (), Data[Date Time] )
    )
RETURN
    CALCULATE (
        SUM ( Data[AssignedTask] ),
        TREATAS ( _latest, Data[Date], Data[Date Time] )
    )

 

 

Unassigned task: = 
VAR _latest =
    GROUPBY (
        Data,
        Data[Date],
        "@latest", MAXX ( CURRENTGROUP (), Data[Date Time] )
    )
RETURN
    CALCULATE (
        SUM ( Data[UnassignedTsk] ),
        TREATAS ( _latest, Data[Date], Data[Date Time] )
    )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Hi, I changes it to using a calculated measure instead and it worked perfectly!

Thank you so much 🙂

Hi,

Thank you for your message.

My solution was for creating calculated measures.

But I guess you want to create calculated columns.

In my opinion, it has to approach in a different way.

I also can see that the structure of the table is different than what I have created as a sample.

If it is OK with you, please share your sample pbix file's link here, and then I can try to look into it.

 

Thanks.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Hi thanks for the quick response.

Nearly there.

It seems to be working for the 'Assigned tasks'

OMoore_0-1698290841999.png

Latest Assigned tasks =
VAR _latest =
    GROUPBY (
        'Last value of the day',
        'Last value of the day'[Date],
        "@latest", MAXX ( CURRENTGROUP (), 'Last value of the day'[Time] )
    )
RETURN
    CALCULATE (
        SUM ( 'Last value of the day'[AssignedTask] ),
        TREATAS ( _latest, 'Last value of the day'[Date], 'Last value of the day'[Time] )
    )
   
But I am getting an error when I repeat for unassigned?
 
OMoore_1-1698290920169.png

 

Unassigned task: =
VAR _latest =
    GROUPBY (
        'Last value of the day',
        'Last value of the day'[Date],
        "@latest", MAXX ( CURRENTGROUP (), 'Last value of the day'[Time] )
    )
RETURN
    CALCULATE (
        SUM ( 'Last value of the day'[UnnassignedTask] ),
        TREATAS ( _latest, 'Last value of the day'[Date], 'Last value of the day'[Time] )
    )

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.