This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi I am making my custom visual and need the display units drop down menu.....I suspect this is part of power bi utility that was packaged in? but I cannot find any documentation. Can anyone help? Thanks.
Solved! Go to Solution.
Hi @Anonymous
Use a type in your capabilities.json as follows:
"type": {
"formatting": {
"labelDisplayUnits": true
}
}The corresponding class property in your settings.ts will be of type number, as the list value will pass in a number a valueFormatter can use in the value parameter of the ValueFormatterOptions.
Here's some examples from one of my custom visuals (we're looking at the labelDisplayUnits object):
Hopefully this gets you moving!
Daniel
EDIT: the formatting type also has support for fontSize and alignment, values which will add selectors for font size and graphics for left/centre/right alignment as in the properties pane. Here's the section of the JSON schema for capabilities, which documents the formatting object type.
DOUBLE EDIT: looks like fontFamily was added a while back, too; that'll be worth exploring at some point...
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hi @Anonymous
Use a type in your capabilities.json as follows:
"type": {
"formatting": {
"labelDisplayUnits": true
}
}The corresponding class property in your settings.ts will be of type number, as the list value will pass in a number a valueFormatter can use in the value parameter of the ValueFormatterOptions.
Here's some examples from one of my custom visuals (we're looking at the labelDisplayUnits object):
Hopefully this gets you moving!
Daniel
EDIT: the formatting type also has support for fontSize and alignment, values which will add selectors for font size and graphics for left/centre/right alignment as in the properties pane. Here's the section of the JSON schema for capabilities, which documents the formatting object type.
DOUBLE EDIT: looks like fontFamily was added a while back, too; that'll be worth exploring at some point...
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
@dm-p Thank you so much for your help! Every time your suggestions/tutorial guided us to solution. We just made our first custom visual KPI card.
Thank you!
Hi @Anonymous - that's great to hear! Onwards and upwards! 🙂
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |