Forum Discussion
DAX Conditional Formatting the maximum value for each column in a Matrix
- 4 years ago
Read about the difference between aggregators (SUM, MAX) and iterators (SUMX, MAXX). That will help you to decide when to apply which (very roughly aggregators work on columns while iterators work on rows).
Let me know when you have sorted your actual requirement out. The measure I provided is only one of many possible implementations (and a very simplistic one, too). It did work for your original request, but it's perfectly fine for requirements to change during prototyping.
Hi, thank you, here is an idea of the data inside the table.
I would like to just show an icon once for each column (which in this case would be once for each [GROUP]
| EAM | REVENUE | GP | GROUP |
| John | $275 | $44 | ☁️ Cloud |
| Larry | $51,556 | $5,402 | ☁️ Cloud |
| Karl | $34,048 | $5,059 | ☁️ Cloud |
| Kathy | $6,514 | $850 | ☁️ Cloud |
| Tom | $38,528 | $6,945 | ☁️ Cloud |
| John | $31,557 | ($4,097) | 🌐 Network |
| Larry | $3,500 | $301 | 🌐 Network |
| Karl | $152,191 | $26,233 | 🌐 Network |
| Kathy | $131,786 | $16,606 | 🌐 Network |
| Tom | $22,232 | $1,795 | 🌐 Network |
| John | $270,091 | $21,379 | 🔒 Security |
| Karl | $42,710 | $4,271 | 🔒 Security |
| Kathy | $31,657 | $4,605 | 🔒 Security |
Like this?
Of course the proper way would be to use RANKX() etc but that gets a little tricky with measures. You would also need to decide what to do with ties etc.
Sample pbix attached.
- sscanlon4 years ago
Helper II
Thank you so much for taking the time to do that, it looks perfect, but only shows zeros on every row in the column when I drag the measure into the visual (to test and see if I get 0, 1 or 2).
Not sure what else I am doing wrong, I even cleared any filters on the visual or page etc.
Again thank you!
- lbendlin4 years ago
Super User
Please provide sanitized sample data that fully covers your issue.. Please show the expected outcome.
- sscanlon4 years ago
Helper II
I am thinking it is because of our Invoice column, every Invoice is a row, and they can be + GP or - GP, let's say a credit for negative GP.
Issue is we do not put EAM name for negative GP entries / rows. So I think this is throwing off the calculation of GP and the measure.
Might be too hard to figure out, I can try to scrub some data and send to you, maybe some example rows of + and - GP.
Can do tomorrow if you think that helps?
Thanks again