Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Expert Data Modeling with Power BI

You're reading from   Expert Data Modeling with Power BI Get the best out of Power BI by building optimized data models for reporting and business needs

Arrow left icon
Product type Paperback
Published in Jun 2021
Publisher Packt
ISBN-13 9781800205697
Length 612 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Soheil Bakhshi Soheil Bakhshi
Author Profile Icon Soheil Bakhshi
Soheil Bakhshi
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: Data Modeling in Power BI
2. Chapter 1: Introduction to Data Modeling in Power BI FREE CHAPTER 3. Chapter 2: Data Analysis eXpressions and Data Modeling 4. Section 2: Data Preparation in Query Editor
5. Chapter 3: Data Preparation in Power Query Editor 6. Chapter 4: Getting Data from Various Sources 7. Chapter 5: Common Data Preparation Steps 8. Chapter 6: Star Schema Preparation in Power Query Editor 9. Chapter 7: Data Preparation Common Best Practices 10. Section 3: Data Modeling
11. Chapter 8: Data Modeling Components 12. Chapter 9: Star Schema and Data Modeling Common Best Practices 13. Section 4: Advanced Data Modeling
14. Chapter 10: Advanced Data Modeling Techniques 15. Chapter 11: Row-Level Security 16. Chapter 12: Extra Options and Features Available for Data Modeling 17. Other Books You May Enjoy

Adding a custom column

In my experience, adding a new column is one of the most common steps that we take during the data preparation phase. There are countless scenarios where we need to add a new column, such as adding some new analytical equations as a new column, creating data clusters in a new column, adding an index column as a new column, or using some machine learning (ML) and artificial intelligence (AI) algorithms. You may also have many other scenarios in mind. Whether we use the Power Query Editor UI or manually write the Power Query expressions, we must add a custom column using the following function:

Table.AddColumn(Table as table, NewColumnName as text, ColumnGenerator as function, optional ColumnType as nullable type)

In the Table.AddColumn() function, we have the following:

  • Table: This is the input table value, which can be the result of the previous step or other queries that provide table output.
  • NewColumnName: This is quite self-explanatory &...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime