Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
City | User | 1/1 | 1/2 | 1/3 | 1/4 | 1/5 | 1/6 | min | max |
Aatlanta | 15 | 12 | 3 | 15 | 7 | 5 | 9 | 3 | 15 |
Chicagot | 12 | 0 | 1 | 11 | 7 | 5 | 9 | 0 | 11 |
Solved! Go to Solution.
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:
Create two measures
MaxLogins =
CALCULATE(
MAX('Table'[Value]),
FILTER(
'Table',
'Table'[Column] <> "User"
)
)
MinLogins =
CALCULATE(
MIN('Table'[Value]),
ALLEXCEPT('Table', 'Table'[City])
)
Final output
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
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:
Create two measures
MaxLogins =
CALCULATE(
MAX('Table'[Value]),
FILTER(
'Table',
'Table'[Column] <> "User"
)
)
MinLogins =
CALCULATE(
MIN('Table'[Value]),
ALLEXCEPT('Table', 'Table'[City])
)
Final output
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
@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
Proud to be a Super User! |
|
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |