Forum Discussion
Blank columns when doing Measure Name Measure Value approach
- 3 months ago
Hi GilbertGotfried ,
Thanks for the patience
Dynamic format strings work fine when a measure is used directly in a visual. The issue appears only when the measure is wrapped inside a SWITCH (or similar) expression. In that case, Power BI evaluates the wrapper instead of the original measure, so the original format string (like $ or %) doesn’t carry through, and the wrapper’s formatting is applied.
If all measures share the same format, you can just format the wrapper measure itself. If you’re dealing with mixed formats, the recommended approach is to use Calculation Groups with SELECTEDMEASURE() and SELECTEDMEASUREFORMATSTRING() to properly preserve dynamic formatting.
Please refer to the provided documentations:
1) Dynamic format strings in DAX: https://learn.microsoft.com/en-us/dax/dynamic-format-strings
2) Calculation groups : https://learn.microsoft.com/en-us/power-bi/transform-model/calculation-groups
Best Regards,
Abdul Rafi
You lost me. Why is it that when I put the field directly on the matrix, it puts the $ format from the dynamic format string, but right next to it the same field that's pulled in using the "selected measure value" doesn't?
So the answer is not using dynamic format strings?
Hi GilbertGotfried ,
Thanks for the patience
Dynamic format strings work fine when a measure is used directly in a visual. The issue appears only when the measure is wrapped inside a SWITCH (or similar) expression. In that case, Power BI evaluates the wrapper instead of the original measure, so the original format string (like $ or %) doesn’t carry through, and the wrapper’s formatting is applied.
If all measures share the same format, you can just format the wrapper measure itself. If you’re dealing with mixed formats, the recommended approach is to use Calculation Groups with SELECTEDMEASURE() and SELECTEDMEASUREFORMATSTRING() to properly preserve dynamic formatting.
Please refer to the provided documentations:
1) Dynamic format strings in DAX: https://learn.microsoft.com/en-us/dax/dynamic-format-strings
2) Calculation groups : https://learn.microsoft.com/en-us/power-bi/transform-model/calculation-groups
Best Regards,
Abdul Rafi