Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I'm importing data into Power BI and I have "Duration" column which stores duration in seconds. I want to convert it to minutes so I've created a new column and used the following function:
ROUNDUP (mytable[Duration]/60,0)
This function works in my other report. However, it doesn't work in my new report: I'm getting "Cannot convert value " of type Text to type Integer" error. I suspect that this is due to some blank data in Duration column.
I've tried removing blank data by using filtering in power query: power query >> click on Duration table >> filter >> remove empty.
I've also tried to replace blank data: power query>> transform >> replace values >> find "blank" and "null" >> replace with 0. Both methods don't work and I'm still getting error message.
Any ideas, please?
Solved! Go to Solution.
HI, @Anonymous
That must be mytable[Duration] is a text column, means there must be some text format value in it.
Please change the data type of this column into number as below:
Then you filter which row is error.
Best Regards,
Lin
Hi,
I am also facing this issue, Any help is greatly appreciated!
HI, @Anonymous
That must be mytable[Duration] is a text column, means there must be some text format value in it.
Please change the data type of this column into number as below:
Then you filter which row is error.
Best Regards,
Lin
Thanks for your tip @v-lili6-msft! I've changed the data type to decimal number in power query editor and I didn't get any errors but I had some blanks, which I removed in filter >> remove empty.
My new column is now working as expected.
You could use the column quality and distribution features under the View menu in Power Query to have a look at your data. You should be able to find the dodgy values that way.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |