Use Color Codes from Option Sets in both Dynamics 365 charts and Power BI

Option Sets in Dynamics 365 has a setting for each value to specify a color code. This color code is used in the new Unified Interface in the entity specific dashboards. This is a welcome addition as it makes it more easy to persist colors to a specific value and have it be consistent throughout the charts and visuals.

option set color code to UI entitiy dashboard

With the August 2018 release of the Power BI Desktop client, we can now also do conditional formatting based on a field with a color code in Power BI reports.

power bi option set color value

Since we can query option sets directly, and get the color code into the Power BI dataset, we can now use the same color scheme more easily between the two solutions. As the option sets are queried, any updates to values, labels, and color codes in the option set, will automatically update on the Power BI side as well.

For querying the Dynamics 365 option set into Power BI, I use the Power Query (M) Builder tool for the XrmToolBox.

Here’s a video explaining how the color codes are used in Dynamics 365, and how to query the codes and use them in Power BI.

Enjoy. As always, please sign up for my newsletter or follow me on Twitter 

2 thoughts on “Use Color Codes from Option Sets in both Dynamics 365 charts and Power BI

  1. Reblogged this on crmazurecomponents and commented:
    A really good blog which we can use to control the chart colors in Power BI based upon the option set color codes configured in Dynamics. 

    Using the blog, we can set the color each record will occupy in a table view in Power BI based upon the value in its corresponding option set field.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s