Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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:
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
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.
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
Proud to be a Super User!
User | Count |
---|---|
86 | |
82 | |
42 | |
40 | |
35 |