Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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?
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |