Forum Discussion
Maximum for a measure
Hello,
Here is my problem.
I have companies and I have 3 categories, C, D and H. (There are relationship between tables)
I measured deviations, and I made a matrix which shows me per company (rows) and per category (colums) the deviations.
Now, I want to calculate the maximum value all categories for each company.
Which means, I want to see the maximum value between C, D and H for each company.
For example, a company A has a deviation of 10 for C, of 20 for D and of 15 for H. The maximum value would be 20.
Thank you for your help.
- Anonymous6 years ago
The solution to my problem is :
Max Value deviation = MAXX(DISTINCT(Categories),[Deviation])
6 Replies
- jstorm
Resolver III
What you need is a measure that removes the category filter. Something like:
CALCULATE( MAX( deviation), ALL( Categories ) )
Although I'm not explicitly sure how your tables are set up. The ALL() filter returns all values from 'Categories' table with all previously applied filters removed. Adding this measure to your table should return your highest value in any category fro each company.
- AnonymousNot applicable
No this doesn't work unfortunately...
- AnonymousNot applicable
Let me be more precise.
Before I had this measure :
Max Value deviation =VAR ValueTable =UNION(ROW("Value",[Deviation C]),ROW("Value",[Deviation D]),ROW("Value",[Deviation H]))RETURNMAXX(ValueTable,[Value])It worked because I had 3 different measures for each categories.But now I set up a table with the 3 categories and made relationship between all tables, and created a matrix.But I want the result as I had with this formula.
- VasTg
Memorable Member
Do you want to see the value 20 in all categories or only at the enterprise level?
Have you tried to click the down arrow on the deviation measure and select Maximum?
The image is just an example of where to find the down arrow
If it helps, mark it as a solution
Congratulations are also good