Forum Discussion
Apply formatting based on previous column value
- 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?
Sorry I am still a confused. I have duplicated your tables and looked into the treatas function but I don't understand how it would be applied here.
Just to make sure we are on the same page. If I updated the input data to add one more row for item 3 with only a score for Phase 3, TEST A I would expect the Item 3 row to be blank except for 1A and 2A being red.
If it helps the logic is, you shouldn't do Phase 2 unless 1 is complete, dont do 3, until 1 & 2 are complete. So once they enter data for Phase 2 or 3, the previous phases should be red to show they are incomplete.
To get the background for Phase2 Test A I need to know the score for Phase3 TestA
I have tried adding a "NextPhase" to the TestPhases table and tried something like this. But obviously doesn't work.
Thanks
I gave you the general approach of reporting on things that are not there. You can add on to that by implementing your logic.
The sample data you provided did not cover all possible scenarios. See if you can provide better sample data.
- tamara_nsb1 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 _scoreNextPhaseThanks AgainBelow is new data and expected resultsItem 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.
- lbendlin1 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?