- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Custom Visual Field Formating
I'm working in a custom visual and i need to implement Field Formatting.
I want to store different settings for every metric i have inserted in the visual
like the way it is implemented in matrix visual on power bi
Is there any reference or source code on git hub on how to implement this feature
Thanks in Advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Try to use this utility please.
You could check MultiKPI visual repository, for instance, to find how to store and work with a format.
Kind Regards,
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
pbicvsupport@microsoft.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Try to use this utility please.
You could check MultiKPI visual repository, for instance, to find how to store and work with a format.
Kind Regards,
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
pbicvsupport@microsoft.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anonymous,
If I understand correctly, you're looking to do something like in this thread? Last we heard, this is not supported for custom visuals and only works in the core visuals, which is a shame, as I really, really want to be able to do it myself.
An alternative is to create a formatting field for each measure in the properties pane, which is not as elegant but gets the job done. The tutorial to do something similar is linked in that thread also. I have a couple of examples in a visual I produce that uses the categorical dataViewMapping (which isn't formatting but generates a text field for each category) which I can provide if this would be useful to you? You would use these in a similar way to take a format string and then use TS code to apply the formatting specified in the field.
Regards,
Daniel
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you provide me the code that you mention?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First of all, you should create a formatter.
Here, you should pass a format.
Then, you should call "format" function of the formatter that will return formatted value.
I hope that it will help.
Kind Regards,
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
pbicvsupport@microsoft.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
in the dropdown which i have in the settings in order to select the metric i do not see the names
of the metrics although i pass them correctly. Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I should see how you set it inside capabilities.json to figure out what is wrong.
I can only suggest that you didn't set "displayName" property for an item as on below picture.
Kind Regards,
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
pbicvsupport@microsoft.com

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
10-20-2024 10:40 PM | |||
07-11-2024 09:30 AM | |||
08-23-2024 07:02 AM | |||
06-11-2024 08:45 PM | |||
03-28-2024 05:09 AM |