Forum Discussion
Using the maximum value in a matrix in a calculation
- Anonymous5 years ago
Hello jdbuchanan71 , I figured it out with the help of this article.
The equations that solved everything were
Max SKU Count = MAXX(SUMMARIZE(ALLSELECTED('Table1').'Table1'[Customer Name],"MSKU",COUNT('Table1'[Pricelist SKU Count])),[MSKU])
where Pricelist SKU Count = a calculated column
Pricelist SKU Count = MAXX('Table1',[Pricelist SKU Count Temp])
where Pricelist SKU Count Temp = a measure
Pricelist SKU Count Temp = DISTINCTCOUNT('Table1'[Item Number])
The mistake I kept making was in the top "Summarize" equation. I started by using DISTINCTCOUNT and kept getting "1" returned as a value. I changed it to COUNT and voila, problem solved! I admit that there are likely bettre ways this can be done but I am happy with it as is.
Hi jdbuchanan71 ! My Value amount is not a measure, it is a distict count of a text field measure. I beleive this changes the proposed solution as I could not get your suggestion to work.
Thanks!
- jdbuchanan715 years agoSuper User
Anonymous
You can write a measure to do the distinct count then use it in my solution.