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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Issue calculate the mean of a defined time.

Hi all,

 

I need your help.

I am trying to calculate the mean of the most recent value for a specific time.

 

This is my situation:

I have reached the values for  Tmax and TGmax according to the serial number (32, 65)

What I would like to have now is the same but with the times shown in red colour.

 

dbb95_0-1605169982467.png

 

When I try to do that, the system takes the value as "count", so the final result that PBI shows is 3,00. It should be 5:00:00 aprox.

 

How can I do this?

 

Thank for your help!!!

 

 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

You can try to use Convert() function to convert the data type to datetime and adjust the date format.

I have create a sample like this:

A_reach.y =
CONVERT (
    SUMX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Reach. y]
                = CALCULATE ( MAX ( 'Table'[Reach. y] ), ALLEXCEPT ( 'Table', 'Table'[ID] ) )
        ),
        [Reach. y]
    )
        / DISTINCTCOUNT ( 'Table'[ID] ),
    DATETIME
)

re.png

Attached the sample file in the below, hopes to help you.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

You can try to use Convert() function to convert the data type to datetime and adjust the date format.

I have create a sample like this:

A_reach.y =
CONVERT (
    SUMX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Reach. y]
                = CALCULATE ( MAX ( 'Table'[Reach. y] ), ALLEXCEPT ( 'Table', 'Table'[ID] ) )
        ),
        [Reach. y]
    )
        / DISTINCTCOUNT ( 'Table'[ID] ),
    DATETIME
)

re.png

Attached the sample file in the below, hopes to help you.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , refer if this can help

https://social.technet.microsoft.com/wiki/contents/articles/33644.powerbi-aggregating-durationtime-in-dax.aspx

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Kudoed Authors