Forum Discussion
Loading data into powerbi
hi ,
How can i load data into power bi as text : example 0090015?
the first 3 record in my data loaded , it trim the first 2 zero
Here is the link to my file
https://1drv.ms/x/s!ApIDnMK2eKiFgQcBMkuQB3U0lybN?e=uigm9J
thanks
Hi ktt777 ,
I have checked your data source. The original data doesn't contain "00".
There are two ways that can implement it. You could follow my step to have a try.
- In Model view > choose Whole number and Custom format : 00#####
https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-custom-format-strings
- Create a formula using FORMAT()
Column = FORMAT(test[Project (7 digits)],"00#####")https://docs.microsoft.com/en-us/dax/format-function-dax
Hi,
You can add a Custom column as
Leading zeros = Text.PadStart(Number.ToText([Column2]),7,"0")
It should resolve your problem.
Thanks
8 Replies
- amitchandakSuper User
ktt777 , check the data type. It should be text. Change it in Data Transformation mode /edit query mode.
- ktt777Helper V
when i change to text, it trim the first 2 zeros
- amitchandakSuper User
ktt777 , OPen data transformation mode, Right-click on Table. Open Advance editor.
It should have a data type there. Is the the data type is text and it is still removing leading 0 ?
- Tahreem24Super User
Try to select that column and change it's format to Text.
- lit2018pbiResolver II
Hi,
You can add a Custom column as
Leading zeros = Text.PadStart(Number.ToText([Column2]),7,"0")
It should resolve your problem.
Thanks