Background for Power BI Chiclet Slicer

Let’s say that you want to color your slicer to become something like this:

ChicletSlicerWithBackgroundColor

First, you need to create a color table for it:

TestColours =
UNION (
ROW ( “Index”, “1”,”RiskType”, “Low”, “ImgURL”, “https://htmlcolors.com/color-image/85e38d.png”, “ImgAsString”, “data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0AQMAAADxGE3JAAAABlBMVEUAAACF442kwz8WAAAAeklEQVR4nO3LMQ0AAAgDsPlXiwMmgo+0f7MnE9/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/33/wCFkN6z5EHC68AAAAASUVORK5CYII=” ),
ROW ( “Index”, “2”,”RiskType”, “Medium”, “ImgURL”, “https://htmlcolors.com/color-image/fdf542.png”, “ImgAsString”, “data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0AQMAAADxGE3JAAAABlBMVEUAAAD99ULpYmwIAAAAeklEQVR4nO3LMQ0AAAgDsPlXiwMmgo+0f7MnE9/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/33/wCFkN6z5EHC68AAAAASUVORK5CYII=” ),
ROW ( “Index”, “3”,”RiskType”, “High”, “ImgURL”, “https://htmlcolors.com/color-image/ff9005.png”, “ImgAsString”, “data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0AQMAAADxGE3JAAAABlBMVEUAAAD/kAUa1PO3AAAAeklEQVR4nO3LMQ0AAAgDsPlXiwMmgo+0f7MnE9/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/33/wCFkN6z5EHC68AAAAASUVORK5CYII=” ),
ROW ( “Index”, “4”,”RiskType”, “Critical”, “ImgURL”, “https://htmlcolors.com/color-image/ff0000.png”, “ImgAsString”, “data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0AQMAAADxGE3JAAAABlBMVEUAAAD/AAAb/40iAAAAeklEQVR4nO3LMQ0AAAgDsPlXiwMmgo+0f7MnE9/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/3fd/33/wCFkN6z5EHC68AAAAASUVORK5CYII=” )
)

ColorTable

in that table:

Index: Index of the color
RiskType: The meaning of color name in this case
ImgURL: https://htmlcolors.com/color-image/hex-color.png (hex-color can be the value of the color in hex format)
ImgAsString: Use https://www.base64-image.de/ to convert the color fron ImgUrl to string, this can help improve performance when use color as background.

Then, In ChicletSlicer visualization:

ChicletSlicerSettings

 

 

Leave a Reply

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

WordPress.com Logo

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

Google photo

You are commenting using your Google 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