Forum Discussion
FORMAT bug
- 3 years ago
Rudz - this is indeed troubling.
I tested this myself on dax.do (Azure Analysis Services) and Power BI Desktop/Service, and see exactly the same behaviour as you've described.
The good news is that format strings (such as the one you posted) appear to behave correctly when applied as the format string of a numerical measure or column.
However, I share your frustration that FORMAT doesn't behave as documented, and for now we'll have to be extra cautious when using it. I'm happy to log this as a bug in the meantime.
Ah I see, yes if you're connecting to a remote model then ideally it is fixed there.
For what you're doing, do you have to return formatted numerical values within a text measure?
If you just need numerical measures, you can always create report-level measures that directly reference the original measures, but set up with the correct format string.
We have a complex formatted KPI table that can't quite be created with the New Card visual. Our workaround is generating HTML from Excel and using the HTML visual. When you include a measure in the HTML, it appears as an unformatted number, so FORMAT is needed. I just wished it worked correctly!