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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Top Kudoed Authors