cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

How to add custom field format in format pane like Multi KPI

Hi. I really appreciate anyone who can take a look at this. 

 

My question is how to show the enumerationObject in the format pane.
 
I am working on learning how to add custom field formatting in the format pane, just like the Multi KPI example. So I downloaded this visual from github and started to read and test the code. But after I ran sudo pbiviz start, I found the field formatting was blank, as shown in the graph. I didn't do any modification on the original code. But, if I ran sudo pbiviz package and import the packed file to powerbi, the field formatting had something. 

 

The code to add field formatting in the Multi KPI example:

 

public enumerateObjectInstancesWithSelectionId(
        options: powerbi.EnumerateVisualObjectInstancesOptions,
        displayName: string,
        selectionId: powerbi.visuals.ISelectionId,
        enumerationObject: powerbi.VisualObjectInstanceEnumerationObject = {
            containers: [],
            instances: [],
        },
    😞 powerbi.VisualObjectInstanceEnumerationObject {
        
        if (this.areOptionsValid(options)) {
            const { objectName } = options;

            const selector: powerbi.data.Selector = selectionId && selectionId.getSelector();

            this.addSettingsToContainer(
                objectName,
                displayName,
                ColorHelper.normalizeSelector(selector),
                enumerationObject,
                this.getSettings(this[objectName]),
            );
        }
        return enumerationObject;
    }
 

 

 

 Get blank field formatting after running pbiviz start:

Screen-Shot-2020-06-20-at-1.28.07-PM


Non-blank field formatting after importing the packed file

Screen-Shot-2020-06-20-at-1.28.38-PM

1 REPLY 1
Highlighted
Super User II
Super User II

Hi @Anonymous,

Unfortunately this can't be done at present. The MS visuals have some special kind of allowance that makes the drop down work correctly and either building them locally or trying to create your own doesn't work the same way. 

There's an issue open in the GitHub project for this and currently has no ETA. A few of us have been waiting some time for it 😞

Not the answer you were hoping for, I'm sure, but might at least confirm you were thinking along the right lines... just not something that's actually fully implemented in the SDK...

Regards,

Daniel





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

Proud to be a Super User!




Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors