Forum Discussion
How to Color A Scatter Plot Distribution By Date
- 5 years ago
Hi Anonymous
Please try measure as:
Measure = IF( MONTH(MAX('Table'[Date]))=1, "red", "blue" )You can also use 'Year(MAX('Table'[Date]))=2021' or 'MAX('Table'[Date])="2021,08,01"'.
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
Hi Anonymous
Please try measure as:
Measure =
IF(
MONTH(MAX('Table'[Date]))=1,
"red",
"blue"
)
You can also use 'Year(MAX('Table'[Date]))=2021' or 'MAX('Table'[Date])="2021,08,01"'.
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
v-xulin-mstf thanks for this solution. Is there a way to color every month or quarter and have a legend or is this code only good for coloring a single month/quarter?
- v-xulin-mstf5 years agoCommunity Support
Hi Anonymous
If you need to set different colors for multiple date ranges, you can use switch function.
Just like:
= SWITCH([Month], 1, "red", 2, "green", 3, "yellow", 4, "blue", else)Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!