Forum Discussion
FORMAT Function error
Hi guys,
I am having difficulty in using the format function.
I have this simple table:
I am using the simple column chart to represent value based on the slicer selection.
This is the measure that i am using:
any suggestion would be really helpful.
Thanks
Please mark my post as solution, this will also help others.
Please give Kudos for support.
9 Replies
- amitchandakSuper User
TaroGulati , Format the first 2 also, This creates few options as numbers and few as %, that will not work
You can explore calculation group if you need a different format for measure slicer
tabular - Calculation groups
https://docs.microsoft.com/en-us/analysis-services/tabular-models/calculation-groups?view=asallproducts-allversions#limitations- TaroGulatiHelper III
amitchandak thanks for the suggestion. i believe with the help of calculation group, this would not work because that will also return a measure as text and graph doesn't accept the format text.
- mwegenerMost Valuable Professional
- Tahreem24Super User
TaroGulati Try this but it will return as text because it has different return types like whole number and percentage value.
Column = SWITCH(TableName[DIM],"A",Format(30,"##"),"B",FORMAT(40,"##"),"C",FORMAT(0.5,"Percent"),"D",FORMAT(0.6,"Percent"))- TaroGulatiHelper III
Tahreem24 thanks for the suggestion. For table is not an issue. I am trying to represnt these values on line chart which doesn't support the text format of measure.