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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

Minimum calculation of a measure

Good morning, I am trying to show the minimum per hour of a range of dates, for example for the 21st hour the minimum I want to get is -36.58 or in the case of the 22nd hour get -27.56. The only thing I have obtained is the minimum at the daily level not the set of dates. Attached photo with the table I have:

Alberto99_0-1658310959771.png

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Syndicate_Admin ,

 

Do you want to create the value corresponding to the following condition.

Column =
RANKX (
    FILTER ( ALL ( 'Table' ), 'Table'[Hour] = MAX ( 'Table'[Hour] ) ),
    'Table'[Value],
    ,
    ASC,
    DENSE
)
M =
CALCULATE (
    MAX ( 'Table'[Value] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Hour] = MAX ( 'Table'[Hour] )
            && 'Table'[Column] = 1
    )
)

vhenrykmstf_1-1659688481048.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @Syndicate_Admin ,

 

Do you want to create the value corresponding to the following condition.

Column =
RANKX (
    FILTER ( ALL ( 'Table' ), 'Table'[Hour] = MAX ( 'Table'[Hour] ) ),
    'Table'[Value],
    ,
    ASC,
    DENSE
)
M =
CALCULATE (
    MAX ( 'Table'[Value] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Hour] = MAX ( 'Table'[Hour] )
            && 'Table'[Column] = 1
    )
)

vhenrykmstf_1-1659688481048.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

johnt75
Super User
Super User

You would need 1 measure per hour, you could try

Min H21 = MINX( ADDCOLUMNS( ALLSELECTED('Date'[Date]), "@val", [H21]), [@val])

Good, I have already obtained the minimum with the formula that you put me before. Now I would like to make that constant value to include it in other tables and not be modified.

Thanks a lot!

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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