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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ashres11
Frequent Visitor

Need help od DAX Minimum and maximum function

I want to develop Matrix for person login per day as following but not able to create min and max like below

Note - Date is in column, there is another calulcate column # of login.

 

Can someone tell me what DAX formula use to create column for min and max.

 

 

CityUser1/11/21/31/41/51/6minmax
Aatlanta1512315759315
Chicagot120111759011
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ashres11 ,

Here some steps that I want to share, you can check them if they suitable for your requirement.

Here is my test data:

vheqmsft_0-1709112720857.png

Create two measures

 

MaxLogins = 
CALCULATE(
    MAX('Table'[Value]),
    FILTER(
        'Table',
        'Table'[Column] <> "User"
    )
)
MinLogins = 
CALCULATE(
    MIN('Table'[Value]),
    ALLEXCEPT('Table', 'Table'[City])
)

 

Final output

vheqmsft_1-1709112800598.png

However, this is based on the data I created. In fact matrix is based on the original table adding two columns behind it is not generating it. If this method doesn't work for your file, please provide your pbix file including your table to table relationships, tables, and hide sensitive information ahead of time. This way we can help you faster.

Best regards,

Albert He

 

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
Anonymous
Not applicable

Hi @ashres11 ,

Here some steps that I want to share, you can check them if they suitable for your requirement.

Here is my test data:

vheqmsft_0-1709112720857.png

Create two measures

 

MaxLogins = 
CALCULATE(
    MAX('Table'[Value]),
    FILTER(
        'Table',
        'Table'[Column] <> "User"
    )
)
MinLogins = 
CALCULATE(
    MIN('Table'[Value]),
    ALLEXCEPT('Table', 'Table'[City])
)

 

Final output

vheqmsft_1-1709112800598.png

However, this is based on the data I created. In fact matrix is based on the original table adding two columns behind it is not generating it. If this method doesn't work for your file, please provide your pbix file including your table to table relationships, tables, and hide sensitive information ahead of time. This way we can help you faster.

Best regards,

Albert He

 

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

 

bhanu_gautam
Super User
Super User

@ashres11 , You can try below DAX

 

for minimum 

Min_Login = MINX(VALUES('YourTableName'[User]), CALCULATE(MIN('YourTableName'[# of login])))

 

For maximum

Max_Login = MAXX(VALUES('YourTableName'[User]), CALCULATE(MAX('YourTableName'[# of login])))

 

Please accept as solution and give kudos if it helps




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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