Hi team,
I have a gallery in which I display daily manual records based on the date. I had written a code to make alternate rows of the same color eg: Light orange and dark orange. But now I want that all daily manual records of one date should be in one color and another date in another color. (only two colors allowed. eg: all record for 15th will be with template fill light orange and all records for 16th should be in dark orange and all records of 17th in light orange). How can I achieve this?
You should be able to use something similar to this:
If(
ThisItem.*Date* = Last(Distinct(*YourDataSource*, *Date*)).Value,
Color.Green,
ThisItem.*Date* = First(Distinct(*YourDataSource*, *Date*)).Value,
Color.Red,
Color.White
)
This checks for the first and last distinct date values, and bases its coloring off of that. As a default I put white in if neither matches. Just make sure to swap in your appropriate values.
Hope this helps!
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473