Tuesday, October 10, 2017

Power BI: Chiclet slicer with image

I haven't been playing and blogging with PowerBI since a while. Recently for a new customer, I had to display a filter on a PowerBI report to include/exclude important projects which need to be reviewed at board level. Since my tenant was in French but the report was in English, I had something really not satisfying, displaying TRUE or FALSE in a slicer, not really meaningful. The board wanted to have something more graphical. You would just click on the green check mark to select flagged projects. 

Nice isn't it?

Basically, in MS Project it is not more than having a flag enterprise custom field in a PDP to flag in or out projects, associated with a graphical indicator. In the project center, flagged projects are displayed with check marks.

First, find on Internet (free of rights) icons corresponding to your need. Prefer PNG format so the icon's background will be highlighted when selected. You can store the icons on a shared library on your PWA instance, accessible at least in read-only by all Power BI users.

Then in Power BI Desktop, you have to import a custom visual named Chiclet slicer. I won't go in details on how to do this, it has been blogged many times already: here is the support article you can refer to. Once done, open the query editor, select the data source containing your flag (ProjectData in my case) and create a new conditional column.

You'll be able to enter a name and generate outputs based on condition. In our case, the output will be the image URL for each value of the custom field (TRUE or FALSE), with a "else if" condition.

Once validated without error and back to Power BI desktop, you can select your dataset then your new conditional column. In the "Modeling" tab, under "Data category", select "Image URL".

In your report, add the new chiclet slicer visual and drag:
  • the flag enterprise custom field in the category and values zones,
  • the new URL conditional column in the Image zone.

In the widget format settings, you can specifiy the size or the chiclet and the split of the image (100% in my case so only the image is displayed, not the label).

Et voilà!! Note that you can even do that with the Enterprise Project Type which is a pretty common filter. The challenge is more to find meaningful icons. 

You'll also note the nice graphical rendering using conditional formatting in table and the Gantt custom visual which particularly applies to Project Online context. 

Share this article :


  1. Could you share the steps for colour formatting the Gantt chart based on conditions, I do not see the option in Gantt Chart vy MAQ software

    1. You'll find a detailled procédure here:

    2. Sorry you meant the Gantt chart formatting and not the table. At this time (October 2017), there was no conditionnal formatting for Gantt chart (and I think it is still the case). So this is simply a field I added as a legend/serie.