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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
oscarca
Helper I
Helper I

Does the "Dynamic" format option exist in "Visual Studio" Tabular model designer ?

Hello Community,

I am trying to achieve something similar to this post https://medium.com/@enridge/different-ways-to-use-dynamic-measures-in-power-bi-448e226667c1
where I have both percentage formatted measures and number formatted in the same switch calculation. I cannot seem to find the Dynamic option in the format settings like the option in Power BI Desktop:

oscarca_0-1699959881211.png

 

What I tried doing is forcing the format in the expression itself since I cannot find the dynamic option in Visual Studio, but when placing the measure in a bar chart it doesnt show any data when selecting "% Of Budget" in the slicer. It seems like the visual has an issue handling two different formats.
Dynamic Measure =
SWITCH (
VALUES ( 'Measures List'[Measure Name] ),
"Sales", [Sales],
"Budget", [Budget],
"% Of Budget", FORMAT([% Of Budget],"0.00%)"
)

Best regards,
Oscarca

2 REPLIES 2
oscarca
Helper I
Helper I

Thank you for your answer ! The field parameter doesn't serm to be supported in the visual studio tabular designer. It doesn't recognize the "NAMEOF" function that is used in the field parameter syntax.

DataInsights
Super User
Super User

@oscarca,

 

Field parameters are a good option. Each measure's format is used, and you avoid using the FORMAT function that converts values to text.

 

https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters 





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

Proud to be a Super User!




Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.