Power BI – Changing Data Types in Power BI
By: David Rohlfs
Introduction
Microsoft has overbuilt Power BI. This is evident with all of the background processes, but also with how the functions are in multiple places all over the system. A great example of this is the many ways that you can change a data type in Power BI.
This blog will aim to show every way that you can change a columns/fields data type in Microsoft Power BI.
When to use it
We are first going to go through all of the ways in Power Query to change a data type, then we will go through the main desktop view. After this I will give all of the data types and some of the specifics on them. Finally, there will be a short list of DAX functions that may be useful to changing data types inside of a measure or column.
Power Query
- The Column Header
- Right Clicking on Column
- Home Ribbon Transform Section
- Transform Ribbon Any Column Section
- M Code Syntax
- Altering Add Column Syntax
Main Desktop View
- Column Tools Header
- Table View Column Header
- Model View Properties
All Data Types
- Decimal Number
- 8.1231324356765765135
- type number
- Fixed Decimal Number
- $ 8.12
- Currency.Type
- Whole Number
- 812
- Int64.Type
- Percentage
- 81.156%
- Percentage.Type
- Date/Time
- 3/31/2024 5:18:00 PM
- type datetime
- Date
- 3/31/2024
- type date
- Time
- 5:18:00 PM
- type time
- Date/Time/Timezone
- 3/31/2024 5:18:00 PM -05:00
- type datetimezone
- Duration
- 05:00:00
- type duration
- Text
- Power BI
- type text
- True/False
- TRUE
- type logical
- Binary
- 01010000 01101111 01110111 01100101 01110010 00100000 01000010 01001001
- type binary
Relevant DAX Functions
Conclusion
There are a lot of ways to change your data type in Power BI. Most of the time you will find the fastest and most efficient way for you to change your data type and almost always use that, but it can always be helpful to try different methods. If you enjoyed this blog, I recommend reading through some other EPM Strategy blogs linked below.
Links Related to This Blog:
Comments
Leave a Reply
You must be logged in to post a comment.