Calculation Groups breaking other visuals #1231
Replies: 1 comment
-
You'll probably get more help by asking this question on the Power BI/Fabric community forum (it's a topic that's been discussed before, see this for example). It's important to distinguish regular format strings (which you can add to any measure in your model), from format string expressions (which are currently available only for calculation items). If you have measures that return a % value, you can simply set the format string on the measure to "percent", "0.00 %" or whatever you need. This will work fine. The problem with format string expressions on calc items, is that the expression is going to apply to all measures of your model, whenever a given calc item is in the filter context. Most likely, you only want the format string expression to apply to a subset of measures. So if you must use calc items, make sure to add conditional logic in your format string expression DAX, so that the dynamic format string only applies to those measures where it makes sense. For example, if the names of all your % measures ends with "%", you can use something like this:
Alternatively, you can use SWITCH() to provide a list of measure names that must be formatted using "percent":
When the DAX format string expression returns a blank value, Power BI should default to the format string defined on the measure itself. |
Beta Was this translation helpful? Give feedback.
-
I had a discussion with Daniel where Calc Groups with format strings are breaking MS Infographic visuals.
Adding format string breaks the viz (even if it is on its own page with no references to a calc group)
Recommendation: I would also be very cautious about specifying format string expressions for calculation items - these are most likely more trouble than they're worth, given Microsoft's current support for dynamic format strings in Power BI visuals.
I am lost. If you can't add format string, how can you do anything with percentages (YOY%)?
Beta Was this translation helpful? Give feedback.
All reactions