Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
madhas
Frequent Visitor

conditional marker colors in a chart

I have a set of x, y value which I want to depict in a chart. Is it possible to color the markers based on a third value (for example date)? I want to gray out all x, y with dates < Date_0 and make the points with date >=Date_0 colorful.

 

I appreciate any help. 

1 ACCEPTED SOLUTION

Hi @madhas ,

 

Please try:

First create a new measure:

 

Measure = IF(SELECTEDVALUE('Table'[Date])<=DATE(2023,5,12),"gray","blue")

 

Then conditional format your data:

vjianbolimsft_0-1685435108991.png

vjianbolimsft_1-1685435121543.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
madhas
Frequent Visitor

@lbendlin 

Here is the sample data:

 

XYDate
122023-05-15
2-22023-05-14
312023-05-13
4-22023-05-12
552023-05-11
642023-05-10
722023-05-09
822023-05-08
9-22023-05-07

 

and here the sample plot:

 

madhas_0-1684131824726.png

 

as I did in this case I need to gray out the points older than 2023-05-12. Of course in this case I changed the colour of each point manually, but it is not feasible when it comes to large set of data. 

Whether the new points are in multicolours or not is not important. The thing is that the older points should get grayed. 

 

Thank you 

 

 

 

 

 

 

 

Hi @madhas ,

 

Please try:

First create a new measure:

 

Measure = IF(SELECTEDVALUE('Table'[Date])<=DATE(2023,5,12),"gray","blue")

 

Then conditional format your data:

vjianbolimsft_0-1685435108991.png

vjianbolimsft_1-1685435121543.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.