Forum Discussion
How to change column format?
- 9 years ago
Hi raymondxie,
Using this formula: Column = format('TableName'[ColumnName],"###-###-###") , you can format the field to display as "xxx-xxx-xxx". But you should note that the data type of this field will be changed to Text rather than number.
Besides, it is not allowed to format the field styles (font and size, ...).
Best regards,
Yuliana Gu
Thank you.
We overlapped posting.
I already updated it and still not working. I added more questions to the original post.
Thanks.
ps.
2. Select your Date column and change the check Date Hierarchy to your column name
3. Just drag the colum up or down in the panel.
- raymondxie9 years agoHelper II
Thank you Vvelarde, what about item 1? how to disable the field being displayed as scientific way?
And how do I change the grid's style(font,size,color....)
Thanks for your help.
- raymondxie9 years agoHelper II
Alright, I figured it out, after the Data Type of the text field is changed from text to Whole Number and the Format changed from Text to Whole Number, the field is displayed as a whole number in text.
My new question is:
In Power BI, is there anything like custom format? I want to show the field in the format of: xxx-xxx-xxx, how can I do it? what about the styles (font and size, ...)?
Thank you
- v-yulgu-msft9 years agoMicrosoft Employee
Hi raymondxie,
Using this formula: Column = format('TableName'[ColumnName],"###-###-###") , you can format the field to display as "xxx-xxx-xxx". But you should note that the data type of this field will be changed to Text rather than number.
Besides, it is not allowed to format the field styles (font and size, ...).
Best regards,
Yuliana Gu