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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
WouterBo
Helper II
Helper II

How to add drop down selections in custom visual formatting options

Hi,

 

When I add columns to the table visual, the "Field Formatting" card allows me to set formatting options per column using a drop down selection list showing each column I added. Please refer to the screenshot for an example of this.

 

How do I use a drop down selection list like this in my custom visual?

 

Thanks,

Wouter

 

field-formatting.png

2 ACCEPTED SOLUTIONS
dm-p
Super User
Super User

Hi @WouterBo,

This is unfortunately not fully implemented in the custom visuals SDK and is a feature a lot of us want:

I'm holding out hope that we might see it some day, but it's been known about for a long time. It's also been raised in the the powerbi-visuals-tools repo and here's the issue if you want to add your voice to it

The above may provide further background, but to summarise: when you enumerate the properties pane, it's possible to create a new instance for an object and this is how data-bound properties work (e.g. colours). As part of this instance, you can add an object known as a container ID, which will make Power BI show the drop-down you're after. At this point things don't fully work and you can't proceed any further with making it behave like the core visuals.

Any custom visuals that do support this, such as Power KPI and Power KPI Matrix are developed by Microsoft and have some kind of special allowance after they've been packaged, as you can compile these locally and they have the same problems as above.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

Thank you Daniel! 

I suspected this, so thank you for confirming. Also, thanks for the links, they will be helpful.

 

EDIT: 

I think I've got it now. And it seems to work too in 3.5.1. 

I used the example in this post: 

https://community.powerbi.com/t5/Custom-Visuals-Development/VisualObjectInstanceEnumerationObject-fo...

 

View solution in original post

5 REPLIES 5
WouterBo
Helper II
Helper II

@dm-p I've read that there is some progress on this issue, although I haven't been able to find any documentation or example code. Are you aware of any?

Hi @WouterBo - no. The closest public example is in the GitHub issue where it's been discussed the most outside of here.

The simplest way may to be obtain the source code for Power KPI or Power KPI Matrix and have a look in there. These are the earliest (and probably most comprehensive) implementations that I know of, and didn't work when this bug was active, but now they build locally successfully and can be used for analysis and comparison.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




djpirra
Helper III
Helper III

Been requesting this feature for more than 2 years now... Have multiple visuals holding and waiting for it to be available and enable the functionality that I pretend to add.

This feature is a must have for custom visuals in my opinion or otherwise most of the scenarios are not viable or require an enormous amount of workarounds to achieve it.

 

Please consider this ASAP.!

dm-p
Super User
Super User

Hi @WouterBo,

This is unfortunately not fully implemented in the custom visuals SDK and is a feature a lot of us want:

I'm holding out hope that we might see it some day, but it's been known about for a long time. It's also been raised in the the powerbi-visuals-tools repo and here's the issue if you want to add your voice to it

The above may provide further background, but to summarise: when you enumerate the properties pane, it's possible to create a new instance for an object and this is how data-bound properties work (e.g. colours). As part of this instance, you can add an object known as a container ID, which will make Power BI show the drop-down you're after. At this point things don't fully work and you can't proceed any further with making it behave like the core visuals.

Any custom visuals that do support this, such as Power KPI and Power KPI Matrix are developed by Microsoft and have some kind of special allowance after they've been packaged, as you can compile these locally and they have the same problems as above.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Thank you Daniel! 

I suspected this, so thank you for confirming. Also, thanks for the links, they will be helpful.

 

EDIT: 

I think I've got it now. And it seems to work too in 3.5.1. 

I used the example in this post: 

https://community.powerbi.com/t5/Custom-Visuals-Development/VisualObjectInstanceEnumerationObject-fo...

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors