Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I am trying to get the 'max' count in a row within a matrix. My matrix contains the following fields:
I now need to create a further calculation to find the 'max' for each provider and each client within the matrix.
i.e. Orange PLc (provider) has 10 employees, what I need it to count is the maximum number of times an employee visits a client.
For example
Orange PLC
Employee ID - 25 - Visited client ID 1234 3 times
Employee ID 51- Visited client 3455 1 time
I would need to calculation to return '3' as the result for the row.
Please could I have some help with creating this.
Solved! Go to Solution.
Hi @pardeepd84 ,
Based on your description, you want to display the maximum value in the matrix row.
Be aware that DAX measure are based on row context and the matrix is a multidimensional model. As a result, the context in the matrix does not exactly match the context in the two-dimensional dataset.
Best Regards,
Liang 
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@pardeepd84 , Try a measure like
calculate(maxx(values(Table[Employee ID]), calculate(count(Table[Employee ID]))), removefilter(Table[Employee ID]))
Thank you so much
@amitchandak I tried this but it but this does not return the result I require.
I'm not sure why I would use the remove filters option. Please could you advise.
Hi @pardeepd84 ,
Based on your description, you want to display the maximum value in the matrix row.
Be aware that DAX measure are based on row context and the matrix is a multidimensional model. As a result, the context in the matrix does not exactly match the context in the two-dimensional dataset.
Best Regards,
Liang 
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I do not understand your answer. It is not possible to calculate the minimum or maximum in a matrix for each row?
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 82 | |
| 49 | |
| 35 | |
| 31 | |
| 30 |