30 Days to Success in Power BI: Day Ten Add New Calculated Columns

Welcome back to day nine of our thirty-day series on Success in Power BI!  Have you forgotten where we left off from day nine? If so, here is the link to refresh your memory.

We are going to switch gears today and manipulate some of our data set for future lessons. We have the Awards field currently which has a few different awards delimited by comma. We want to separate out this data into separate columns to report on.

  1. Go back to the data view (on the left hand ribbon middle icon).
  2. Right click anywhere inside the grid and choose New Column (as shown in Figure 1).
  3. Type in the following (replacing Column = as shown in Figure 2):  AllStar = IF((FIND(“AS”,’Standard Batting'[Awards],1,0)) > 0,”Yes”,”No”)
  4. Repeat steps two and three: GoldenGlove = IF(FIND(“GG”,’Standard Batting'[Awards],1,0) > 0,”Yes”,”No”)

Figure 1 – Adding a New Column

This language is called DAX or Data Analysis Expressions and it is a library of functions and operators that are used to build expressions and formulas for Analysis Services (SSAS), Power BI Desktop, and Power Pivot for Excel.  Here is an MSDN reference for DAX. And here is a quick reference that I refer to in order to know which function will fulfill my needs.

To summarize what we did above in the steps: we added two new columns called AllStar and GoldenGlove. We looked at the Awards column for AS or GG and used some DAX functionality to return a Yes or a No into these separate columns. Now these awards have more meaning to use other than the long string of awards for that year. Stay tuned to see how we use them!

Figure 2 – Using DAX for a New Column


About SQLGator

Microsoft Data Platform MVP, Florida Gator, Star Wars fanatic and is there anything else...oh yeah PS4! I am a geek and SQL Server Business Intelligence Consultant, there are other technologies greater than these? Not so fast my friend! I also love to travel to new and exotic places.

Posted on March 7, 2017, in Business Intelligence, PowerBI and tagged . Bookmark the permalink. 3 Comments.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: