Forum Discussion
tamara_nsb
1 year agoHelper I
Apply formatting based on previous column value
I need to change background on matrix fields if the "next" phase has a value. I have data as shown, each item has a score for 3 tests. The tests are done 3 times, once for each phase. ...
- 1 year ago
Please validate your test data. I think a 3 and a 10 are switched (item1, A), and a 9 is missing from the expected output (item2, 3A)
Why would item3, 1A and 1B be red when the 2A and 2B cells are empty?
tamara_nsb
1 year agoHelper I
Hi lbendlin
So I have been trying to understand what you sent me and so far got nowhere. Sorry I keep needing more help.
When you say "Add on to that by implementing your own logic" Where would I implement it?
Score_ = CALCULATE(max('Table'[Score]),TREATAS(Items,'Table'[Item]),TREATAS(SUMMARIZE(TestPhases,[Phase],[TEST]),'Table'[Phase],'Table'[TEST])) & ""
Do you mean where the "& "" is in the score_ measure?
I did try something like this,
CALCULATE(max('Table'[Score]),TREATAS(Items,'Table'[Item]),TREATAS(SUMMARIZE(TestPhases,[Phase],[TEST]),'Table'[Phase],'Table'[TEST]), Filter(ALLEXCEPT('TestPhases', 'TestPhases'[Phase])), 'TestPhases'[Phase] == "2" && 'TestPhases'[TEST] == "A")
I tried adding a "Next Phase" to the TestPhases table so maybe I could do something with that.
I think I need to create a new score that removes the phase filter ( All, Allexcept ?) , Then apply a new filter to the phase to calculate _scoreNextPhase
Thanks Again
Below is new data and expected results
| Item | TEST | Score | Phase |
| Item1 | A | 2 | 1 |
| Item1 | A | 8 | 2 |
| Item1 | A | 3 | 10 |
| Item1 | B | 5 | 1 |
| Item1 | B | 8 | 2 |
| Item1 | B | 9 | 3 |
| Item1 | C | 7 | 1 |
| Item1 | C | 8 | 2 |
| Item1 | C | 10 | 3 |
| Item2 | A | 6 | 1 |
| Item2 | B | 6 | 1 |
| Item2 | C | 6 | 1 |
| Item2 | A | 9 | 3 |
| Item3 | A | 9 | 3 |
| Item3 | B | 9 | 3 |
Nothing in phase 3 will be red because there is no phase 4.
lbendlin
1 year agoSuper User
Please validate your test data. I think a 3 and a 10 are switched (item1, A), and a 9 is missing from the expected output (item2, 3A)
Why would item3, 1A and 1B be red when the 2A and 2B cells are empty?