Power BI for Data Analytics - Full Course for Beginners — Transcript
Full transcript
- 0:00nerds. Welcome to this full course
- 0:02tutorial on PowerBI for data analytics.
- 0:05This is the course I wish I had when I
- 0:06first started as a data analyst. You're
- 0:08going to be working right alongside me
- 0:10as we start with the basics of learning
- 0:12how to visualize insights and doing this
- 0:15with a variety of realworld data sets.
- 0:18This foundation will help us build out
- 0:20our very first portfolio project. Now,
- 0:22in the second half of the course, we'll
- 0:24go to more advanced concepts like data
- 0:26cleanup with Power Query and data
- 0:28modeling with DAX. We'll finally put
- 0:30this all together with our final
- 0:32customizable project. Now, to master
- 0:35this tool, we're not going to go
- 0:36straight for 8 hours. Instead, we're
- 0:38going to break it down into 10 to 20
- 0:40minute lessons. During this, we'll have
- 0:42exercises for you to learn while doing,
- 0:44not just watching, followed by some
- 0:46practice problems to reinforce your
- 0:48newly learned skills. Now PowerBI is one
- 0:50of the most popular business
- 0:52intelligence tools in the world and when
- 0:54looking at holistically across all tools
- 0:56for data analyst it's in the top five
- 0:59and for business analysts it's even
- 1:01higher in the top four. Technically both
- 1:03these cases PowerBI is the second most
- 1:05popular BI tool. However over the past
- 1:08couple years it's been gaining
- 1:09popularity over its competitor Tableau
- 1:12and I expect it to eventually become the
- 1:14number one tool. Now what gives me the
- 1:16street cred to teach this tool? Well,
- 1:17PowerBI was the first data analytics
- 1:19tool I learned after Excel when starting
- 1:21my data analyst career. I've built
- 1:23countless dashboards for a global 500
- 1:25company to improve their supply chain
- 1:27logistics. And I even implemented
- 1:29PowerBI when working for Mr. Beast,
- 1:31though I can't share anything because of
- 1:33and I've also built a few courses on
- 1:34data camp that have over 30,000 students
- 1:37and teaching them how to use PowerBI.
- 1:38And so over the years, I've been
- 1:40cataloging all the most important
- 1:42features inside of PowerBI and I put it
- 1:45all into this course which is for
- 1:47beginners. You don't need any previous
- 1:49analytical or dashboarding experience.
- 1:52We'll be starting with the first half to
- 1:53build up your knowledge on the
- 1:54fundamentals with getting PowerBI
- 1:56installed and connected to the data for
- 1:58this course. From there, we'll get you
- 2:00familiar with working around and how to
- 2:01manipulate a PowerBI report. Then we'll
- 2:03shift into practical exercises,
- 2:05analyzing data, using the most popular
- 2:07charts, and implementing other tools
- 2:09like slicers, buttons, and bookmarks. At
- 2:12the end of these basic chapters, we'll
- 2:13put your skills to the test to build an
- 2:15interactive dashboard to help job
- 2:17seekers gain insights into the top roles
- 2:19available in data science. For the
- 2:21second half of the course, we're going
- 2:22to ramp things up and dive into advanced
- 2:24analytical features. We'll learn how to
- 2:26use Power Query and DEP to connect to a
- 2:28variety of data sets and perform ETL or
- 2:31extract, transform, and load. Finally,
- 2:33we'll learn the basics of data modeling
- 2:35and perform advanced calculations with
- 2:37the DAX language. By the end of the
- 2:39advanced chapters, we'll have built an
- 2:40upgraded version of our dashboard in the
- 2:42first half that focuses on the top
- 2:44skills and jobs in data science, which
- 2:47I'm going to show you how to share both
- 2:48of these projects so you can demonstrate
- 2:50your newfound experience in using
- 2:52PowerBI. Now, I'm a big believer in
- 2:54open- sourcing education. So, this
- 2:56course and all the files and content
- 2:58needed to complete it are completely
- 3:01free. I not only get you set up with
- 3:02installing PowerBI, but I also provide
- 3:04all the different reports and dashboards
- 3:07needed throughout. Unfortunately, the
- 3:09AdSense revenue alone for this video is
- 3:11not going to be enough to supplement all
- 3:13the different costs associated with
- 3:15building this out. So, I have an option
- 3:18for those that want to help support. For
- 3:20those who purchase my supporter
- 3:21resources, you're going to get access to
- 3:23features to help speed up your
- 3:24learnings, all provided through this
- 3:26custom dashboard to track your progress.
- 3:28In here, you'll be able to watch all the
- 3:30individual lessons from the course, so
- 3:31it's not one long 8-hour video. Then,
- 3:34after the video lessons, you'll get
- 3:35guided practice problems that will not
- 3:36only provide the solution, you'll even
- 3:38get my step-by-step lesson plans that
- 3:40walk through each of the lessons as I
- 3:42perform them. And finally, when you
- 3:43complete the course, I'll email you a
- 3:45certificate of completion that you can
- 3:47upload to LinkedIn to show your
- 3:48experience. One quick shout out before
- 3:50we begin, and that's to Kelly Adams.
- 3:52She's the brains behind the practice
- 3:54problems. And if I didn't have her help,
- 3:56I probably would have never finished.
- 3:57Anyway, before we actually jump into
- 4:00this course, we need to understand what
- 4:02is PowerBI and more specifically, where
- 4:05the heck did it even come from? Well, it
- 4:08all started with this. Yep, that's an
- 4:11Excel spreadsheet. And this bad boy is
- 4:14used by over 1 billion users monthly.
- 4:16Now, let me be clear. Excel is great. I
- 4:18got a whole course on it, and I even
- 4:20recommend you learning it before
- 4:21learning PowerBI. However, this is where
- 4:24our problem actually begins. So, back in
- 4:27the 1980s, this dude decided he was
- 4:29going to revolutionize the world. I'm
- 4:31Bill Gates, chairman of Microsoft.
- 4:34In this video, you're going to see the
- 4:37future. So, Excel came on the scene and
- 4:39its goal was to dominate the spreadsheet
- 4:41software industry. Now, to be clear, its
- 4:43primary purpose at the time was people
- 4:44like analysts that needed to store and
- 4:46analyze data that was in rows and
- 4:49columns. This tool has done a heck of a
- 4:50job since then as it's eaten up most of
- 4:53all the market share. There's only a few
- 4:55other competitors and they're not even
- 4:57close. Now over the years Microsoft has
- 4:59adding more and more features to this
- 5:02such as Power Pivot in 2010 which is a
- 5:04great tool for data modeling and also
- 5:06using the DAX language. Then Power Query
- 5:09in 2011 which is my favorite tool and
- 5:12allows ETL or extract, transform and
- 5:14load of multiple data sets into Excel.
- 5:17Anyway, with this supercharged Excel,
- 5:19this has led managers to demand more and
- 5:22more out of their employees of what they
- 5:24can get from spreadsheets. So that way
- 5:26they don't have to get in the sheets.
- 5:28And this is where dashboards come in.
- 5:30Yep. Just like this 1981 Delorean.
- 5:33Analytical dashboards draw their
- 5:36inspiration from car dashboards which
- 5:38allow drivers to get insights at a quick
- 5:41glance. Now you can overdo upgrades to a
- 5:44dashboard and get yourself into some
- 5:46trouble, but that's for an upcoming
- 5:47lesson to go over. Anyway, building
- 5:49dashboards in Excel, a tool that was
- 5:51designed to manipulate data in columns
- 5:53and rows for mainly analyst, comes with
- 5:56a host of new problems. If you don't
- 5:58build it right, you can have your users
- 5:59dragging stuff all over the place. Hey,
- 6:01come back here. Drop downs on the
- 6:03surface, although they look simple, take
- 6:05a bunch of formulas behind the scenes
- 6:08even to get those values into the drop
- 6:10down. And because of this, charts take
- 6:12even more formulas to work properly and
- 6:15get them into their visualization. Oh,
- 6:17and don't even get me started on
- 6:18sharing. How the heck do you even know
- 6:21which dashboard is the most up-to-date
- 6:23Excel file, especially when everybody
- 6:24send them around? Now, in order to solve
- 6:26this problem, in 2013, Microsoft
- 6:29released their business intelligence
- 6:31solution. And this tool allows you to
- 6:33create dashboards. Super easy. All I got
- 6:35to do is load the data in. So, adding
- 6:37something like a dropown is super
- 6:38simple. All I do is insert it into my
- 6:40visual and then add in the appropriate
- 6:42field. Building a chart is just as
- 6:43simple. All I got to do is add it in and
- 6:46add the appropriate fields. Oh, and my
- 6:47dropown automatically syncs and works
- 6:49with this. And with a click of a button,
- 6:51I can publish this dashboard and my
- 6:53co-workers can have access to my most
- 6:55up-to-date dashboard. Now, I am getting
- 6:57ahead of myself. We need to be aware of
- 6:59the different parts of the PowerBI
- 7:01ecosystem. First up is this, which we've
- 7:04been in, and that's the PowerBI app, or
- 7:06also known as PowerBI Desktop. Unlike
- 7:08Excel, this bad boy is free.99 on
- 7:11Microsoft Store and it has slightly
- 7:13different terminology than Excel in that
- 7:15this is a report, not a spreadsheet. And
- 7:17then we can add multiple different pages
- 7:19to it, not Sheets. Now, this report
- 7:22saves as its own file. And if you wanted
- 7:24to, you could go ahead and just share
- 7:26this file with a co-orker and they can
- 7:28open it as long as they have PowerBI.
- 7:29However, you get into a similar problem
- 7:30with Excel dashboards and that you got
- 7:32all these files. So, what's the
- 7:33solution? Well, the PowerBI service.
- 7:36This is a cloud-based platform. You get
- 7:38to it in your internet browser. And it
- 7:40allows you to share dashboards with all
- 7:42your best friends. So, let's show what
- 7:43we can do with this. Remember that
- 7:44previous Excel dashboard that I built?
- 7:46Well, I recreated in PowerBI. And now I
- 7:48want to go forward with sharing it. All
- 7:50I got to do is click publish. And bada
- 7:52bing, bada boom, it's inside of the
- 7:54PowerBI service, ready to be shared with
- 7:56all my co-workers inside of my
- 7:58workspace. Workspaces are just areas you
- 8:00can store different dashboards and you
- 8:02can invite certain friends to certain
- 8:04workspaces. We'll go in more detail on
- 8:06this in an upcoming lesson. Anyway, we
- 8:07could share this a multitude of
- 8:08different ways. Co-workers could come
- 8:09inside of the PowerBI service and access
- 8:11it. If the data is not confidential, I
- 8:13could publish this data to the web and
- 8:15you could access it. This is actually
- 8:16how I went about sharing our different
- 8:18projects that we're going to be building
- 8:20in PowerBI. Check them out the links. Or
- 8:22you could share to other Microsoft
- 8:23services that you're collaborating on
- 8:24such as SharePoints or even Microsoft
- 8:26Teams. Now, there's one big drawback to
- 8:29PowerBI service and that comes to the
- 8:31cost. It ain't free. They do have a free
- 8:33option, but it's super limiting and I
- 8:35don't recommend it. Anyway, for this
- 8:36course, I purchased the PowerBI Pro
- 8:38license, and I'll go through and show
- 8:40you all the features for it. But to be
- 8:42very clear, you don't need to purchase a
- 8:45license for this course at all. I'll
- 8:47show you everything you need to know.
- 8:48The only reason why you'd need to buy a
- 8:50license is if you want to share a
- 8:52dashboard to the service like I did with
- 8:54those dashboards. Now, real quick, you
- 8:56may see this new branding come out of
- 8:58Microsoft Fabric, and what it's trying
- 9:00to do is consolidate all of its
- 9:02different data analytical, data
- 9:04engineering, data science tools into one
- 9:05platform. Don't worry, not a big deal.
- 9:07PowerBI is still in there, still works
- 9:09just fine. It's just under a different
- 9:11umbrella. So, let's get into the course
- 9:13intro next so your co-workers don't ask
- 9:16you how to export to Excel from PowerBI.
- 9:19Now, we got that out of the way, let's
- 9:20get into the course material. We're
- 9:22going to first start with understanding
- 9:24all the different resources available
- 9:25for free along with the supporter
- 9:26resources and then from there exploring
- 9:29what data set we're actually going to be
- 9:30analyzing for this course. With the link
- 9:33provided, you can navigate to this which
- 9:35is the Google Drive that has all the
- 9:37different folders and files necessary
- 9:39for the course. Each folder has a
- 9:40different purpose. Up at the top are the
- 9:42different projects. In each is the final
- 9:44dashboard along with a write up on it in
- 9:46a readme file. Under this are the
- 9:48individual chapters. Right now, there's
- 9:50four chapters in this course. And then
- 9:52inside of this, they have the files for
- 9:54each individual lesson. Conveniently,
- 9:56I've numbered them all. Next up, after
- 9:57the chapters is the data folder, which
- 9:59has our data sets, all in a variety of
- 10:01different forms. Don't worry, I'll be
- 10:03walking you through how to use each
- 10:04individual one of these as we go
- 10:06through. And finally, we have folders
- 10:07for resources and read me, which aren't
- 10:09really important right now. We'll cover
- 10:10more later. Anyway, how the heck do we
- 10:12get any of these files? Well, you can
- 10:14download any folder by just clicking
- 10:16download or even a file by doing the
- 10:18same. However, to make it easier on you,
- 10:19I recommend just using this download all
- 10:21option up at the top. Now, this bad boy
- 10:23is pretty big. It's almost a gig and
- 10:26it's probably going to take over a
- 10:27minute to download. So, if you have a
- 10:29slow internet connection, you may want
- 10:31to just download individual folders as
- 10:33you go through. Now, for those who
- 10:34support the course through purchasing my
- 10:36supporter resources, you'll have access
- 10:38to this custom dashboard where you'll be
- 10:40able to go through and watch an
- 10:42individual lesson. And then after this,
- 10:44you'll be guided to all the different
- 10:45practice problems to help refine your
- 10:47knowledge. Now, on top of this, you're
- 10:48going to get access to the course notes,
- 10:50which are broken down by chapter. These
- 10:52break down concepts in a similar
- 10:54structure in how I do in the video
- 10:56lessons, so you can follow right
- 10:58alongside me if you're more of a visual
- 11:00learner. Just as a reminder, there's no
- 11:02requirement to purchase these supporter
- 11:04resources. They're just a way to help
- 11:06fund future content like this. Anyway,
- 11:09what the heck are we actually going to
- 11:10be analyzing in PowerBI? Well, you're
- 11:13going to be taking the role of a job
- 11:14seeker and exploring some of the top
- 11:16salaries and skills of data nerds. And
- 11:18for this, we're going to be using data
- 11:20from my app, which has almost 4 million
- 11:22job postings right now. Anyway, it tells
- 11:25based on a job title, such as data
- 11:27analyst, and a location, such as the
- 11:29United States, what are the top skills
- 11:31requested in job postings? Right now,
- 11:34PowerBI's in almost one in every eight
- 11:36job postings. And this app not only
- 11:38tells us about skills, but also about
- 11:40jobs as well, like what are their
- 11:42salaries. You can even evaluate trends
- 11:44of skills over time, which that's how I
- 11:46did that in the last part of the video.
- 11:48Now, as I mentioned, the data sets we'll
- 11:50be using for this course are inside of
- 11:51this data folder right here. But the
- 11:53primary one that we're using for the
- 11:54beginning of the course of this one here
- 11:56of job postings flat. This bad boy has
- 11:59job postings from 2024. In fact, it has
- 12:02almost 500,000 job postings from this
- 12:05year. And these job postings aren't just
- 12:07limited to data analysts. We also have a
- 12:09variety of other different things like
- 12:11data engineers and data scientists along
- 12:13with their associated senior roles. And
- 12:15you're not limited to just exploring the
- 12:17United States like I'm going to do. You
- 12:18can explore any host of different
- 12:20countries. Now, with any course, you're
- 12:22probably going to get stuck along the
- 12:23way. So, how do you get help with this?
- 12:25Well, I don't recommend jumping straight
- 12:27into the comment section and asking for
- 12:28help. Instead, you can get an answer a
- 12:31lot quicker with chat bots like Gemini
- 12:33or Chat GBT. You can either ask it a
- 12:35question or put in your error message
- 12:37and it will go through and provide you
- 12:39stepbystep instructions on what to do.
- 12:42Now, feel free to use any free chatbot.
- 12:44Judge BT and Gemini offer this, but I've
- 12:46noticed that Gemini has been the best at
- 12:48working with PowerBI. All right, so if
- 12:49you haven't done so already, it's your
- 12:51turn to now go through and download
- 12:52those course files. In the next lesson,
- 12:55we're going to be going through and
- 12:57installing PowerBI and walking through
- 12:59the guey or graphical user interface in
- 13:02order to better understand how to make
- 13:04visualizations. With that, I'll see you
- 13:06there.
- 13:09All right, welcome to the first chapter.
- 13:11We're going to be doing a grand tour of
- 13:13PowerBI. The purpose of this is not for
- 13:16you to be a master, but more of you to
- 13:18be able to understand all the different
- 13:20features and functionality of PowerBI
- 13:23app and also the service. In this
- 13:25lesson, we're going to be going over how
- 13:28to get PowerBI installed and set up on
- 13:30your computer. After that, we're going
- 13:32to do a walkthrough of the UI in here,
- 13:35understanding things like the ribbon,
- 13:37the different views and panes. In the
- 13:40second lesson, we're going to take it a
- 13:41step further and build a very simple
- 13:44dashboard that goes through and analyzes
- 13:47our data set and gives us an intro of
- 13:50what we're going to be capable of doing
- 13:51later on. And then finally, in the third
- 13:53lesson, we're going to be moving into
- 13:55sharing that dashboard you built,
- 13:56specifically using the PowerBI service,
- 13:59which is the basically only method
- 14:02available to actually upload and share
- 14:04your dashboard. Now, by the end of this
- 14:06chapter, you're going to have a holistic
- 14:08understanding of how PowerBI actually
- 14:11works and all the different
- 14:12functionality of it. You're not going to
- 14:13be a master, but you're going to be able
- 14:15to now take this a step further as we'll
- 14:17go on in the other chapters.
- 14:22So, first things first, what are the
- 14:24operating system requirements for this
- 14:28course? Well, PowerBI is exclusive to
- 14:32Windows only. right here. I'm going to
- 14:34go ahead and minimize this down. I'm
- 14:35running this on Windows. Now, you may be
- 14:38like me and have a Mac, which that's
- 14:40what I'm filming this on right here. And
- 14:42if you try to actually search for
- 14:43PowerBI on Mac, you're going to find
- 14:45that it's not available. Once again,
- 14:47like I said, it's exclusive to Windows.
- 14:49Even trying to search for it on the App
- 14:51Store, nothing appears except for a
- 14:53solution that I actually use. So,
- 14:55Parallels, which I've been using for the
- 14:56past 5 years, is a virtual machine and
- 14:59it allows you to run here. I have
- 15:01Windows inside of my Mac machine and
- 15:05inside of that I have PowerBI running.
- 15:08One neat thing about Parallels is they
- 15:10have this thing called coherence mode.
- 15:12So I click this blue icon right here.
- 15:14It's going into coherence. And from
- 15:15there it allows me to have that PowerBI
- 15:18window in its own window alongside any
- 15:21other windows I may have open. So it's
- 15:24like I'm basically having a Windows app
- 15:26inside of Mac and it's pretty seamless
- 15:29environment. Anyway, I have an affiliate
- 15:31link for those that have Mac and want to
- 15:33run Windows on their machine. And they
- 15:35have a few different options you can do
- 15:37for this specifically. You can get it
- 15:39either as a subscription or a one-time
- 15:42purchase. If you do the one-time
- 15:43purchase, then you don't get renewing
- 15:45updates along the way. So, that's why I
- 15:48stick with the subscription. Personally,
- 15:49I like to fine-tune of whether I can
- 15:51have more than just 8 GB of RAM. So, I'm
- 15:54using the Parallels Desktop Edition,
- 15:56specifically that Pro Edition. Now, one
- 15:57note, they do have an option for
- 15:59students to get it in a very discounted
- 16:02option. So, take use of that if you can.
- 16:04Now, now that we're past operating
- 16:05system, there are a few different
- 16:06computer requirements you need to think
- 16:08of because this is a pretty intense
- 16:10software we're using. Specifically,
- 16:12Microsoft themselves recommends the
- 16:14following that you have Windows 10 or
- 16:16above. They recommend 4 GB or above and
- 16:19then a CPU that is 64bit. Now, I have my
- 16:23own personal recommendations which are
- 16:25based on my experience and seeing how
- 16:27slow this app could get depending on
- 16:28your RAM. Specifically, if you have
- 16:29Windows, you need to get 8 gigabytes or
- 16:32above of RAM. You can do the four like
- 16:34they recommend. It's going to be super
- 16:35slow. For a Mac, I wouldn't do anything
- 16:38minimum below 16 GB. And that's because
- 16:41Apple or Mac is already running already,
- 16:43and that takes up enough space already.
- 16:45So, if you want to have this VM, this
- 16:47virtual machine that's taking up 8 GB,
- 16:49it's going to eat into that 16 GB. I
- 16:52built this entire course using a virtual
- 16:54machine with 8 gigabytes of RAM. So, I
- 16:56know it works for me and I know it's
- 16:58going to work for you.
- 17:01Let's get into downloading PowerBI. And
- 17:03you could Google it and go to this
- 17:05download link and download it, but I
- 17:07highly recommend you don't do that.
- 17:08Instead, we're going to be installing it
- 17:10from the Microsoft Store. And there's
- 17:12four key reasons why. First, it has auto
- 17:15updates. Two, it's a more efficient
- 17:17download, so it's going to take up less
- 17:18space. Three, there's no admin
- 17:20privileges that are going to be
- 17:22necessary or enabled later on. And then
- 17:24finally, if you're outside the US, it's
- 17:26going to adapt to your system languages
- 17:28and preferences. All right, so here I am
- 17:30on a fresh Windows install. We're going
- 17:32to go ahead and open up up the Microsoft
- 17:34Store. Inside of here, I'm going to
- 17:36search for PowerBI. We want PowerBI
- 17:38desktop. This report builder is just a
- 17:41lightweight version of PowerBI that
- 17:43doesn't have all the features. You don't
- 17:44want that. And we're going to go kick
- 17:46here and click get. Then click one more
- 17:48time to get get your download completed
- 17:50in less than a minute. And so I opened
- 17:52it up. When initially opening up, this
- 17:54is what you're going to see. And you can
- 17:56start from any form of data source. They
- 17:58may give you recommended options. Then
- 18:00when we start generating more files,
- 18:01they will appear down here in recent. I
- 18:03just want a blank report, so I'm going
- 18:05to go ahead and click that. On opening
- 18:06it, it prompts me that dark mode is
- 18:08here. And I'm not gonna lie, normally
- 18:11I'm very much a fan of dark mode if you
- 18:13watch any my previous courses, but they
- 18:15uh for there some reason the contrast
- 18:17just isn't right in my eyes. I don't
- 18:19like it that much. So I'm going to
- 18:21recommend at least when we go through
- 18:22this tutorial, we're going to leave it
- 18:23on the legacy or if you will light.
- 18:29Now, we're going to dive in some
- 18:30terminology that you need to have down
- 18:32pad, especially as we're going through
- 18:33this. Anytime I need to tell you to
- 18:35navigate somewhere, you need to
- 18:36understand where I'm telling you to go
- 18:37to. First up, like any Microsoft
- 18:40product, is the ribbon, and it's located
- 18:42up here at the top. There's a variety of
- 18:44options. We're going to walk through
- 18:45examples of how we can use each of these
- 18:47in this lesson. To the left hand side,
- 18:49we can select a few different views. We
- 18:52have a report view, which is where we're
- 18:53going to build our dashboard, table
- 18:55view, where we can view our data, model
- 18:57view, and then also DAX where we can run
- 19:00queries inside of here. Now, after these
- 19:03views, that's what we've gone through.
- 19:04I'm going to go back to this report
- 19:05view. The other thing to know about is
- 19:07PES. We have PES over here on the right
- 19:10hand side. The three main ones, which
- 19:13there's going to be more that we'll get
- 19:14to, are filters to be able to filter
- 19:16down our page, visualizations, and then
- 19:19also data. And this will show our data
- 19:21model inside of it. Now, the last main
- 19:24thing to cover is the canvas. That's
- 19:26right here in the center. That's where
- 19:27we're going to be building our
- 19:28dashboard. And unlike Excel where we
- 19:31have different worksheets, here we have
- 19:33what are called pages. And so you have
- 19:36different pages that's going on. And
- 19:38this is all within within PowerBI. This
- 19:42is your PowerBI report. In Excel, you
- 19:45would say this is a workbook with
- 19:46worksheets. We got a report with pages.
- 19:51All right. So, let's start diving into
- 19:52each one of these. We're going be going
- 19:53through all of the different ribbon tabs
- 19:56here and then also through the different
- 19:58panes that we have available. We're
- 19:59going to see how this interacts with the
- 20:01canvas. So, let's start with that home
- 20:04tab first. I'm going to close that out
- 20:06and get to home tab. The primary thing
- 20:08I'm using this tab for is for data and
- 20:12also editing my queries on how I'm
- 20:14actually cleaning up my data. As we can
- 20:16see there, there's a variety of
- 20:18different source we can choose from. We
- 20:19can get it from anywhere from Excel
- 20:21workbook to SQL Server to a text file
- 20:23and even the internet. Now, I want to
- 20:26make this portion of the video
- 20:27interactive. So, feel free to follow
- 20:29along with me. We're going to actually
- 20:31put in data into our PowerBI file by
- 20:34saying enter data. And I have this popup
- 20:38that comes up that says, hey, create
- 20:39table. Specifically, I have this data I
- 20:43want to input into there. It's very
- 20:45simple. It's just a column of different
- 20:47job titles and salaries associated with
- 20:50it. So, I'm going to go through and put
- 20:52all those different values into here.
- 20:54First one of business analyst. I'll
- 20:56press enter and I'll start a new row and
- 20:58also put the three others of that
- 21:00analyst, engineer and also scientist.
- 21:01Now also I want another column. So I'll
- 21:03click insert column. From there I'll put
- 21:05in the different salary values for each
- 21:07of these. I don't want these column
- 21:09names to be just column one and column
- 21:112. So I'm going to double click inside
- 21:12of here and change it. And now that we
- 21:14have that, looks like our table's almost
- 21:16complete. I just want to give it a
- 21:18better name than just table. We'll give
- 21:20it salary
- 21:22data. From here I'm going to click load.
- 21:24We're not going to do edit. That's going
- 21:25to open the Power Query editor. We'll
- 21:27worry about that in another chapter.
- 21:28It's going to go through now and load
- 21:30this data into here. So, it's going to
- 21:32go anytime you load data, it's going to
- 21:33go through that loading process. And we
- 21:35can see that it's inside of this PowerBI
- 21:38report because inside of our data pane,
- 21:40we have that table salary data with our
- 21:43two columns, job title and salary. I can
- 21:46also go to the table view and I can view
- 21:49it here showing all the different values
- 21:51inside here. I kind of like this view a
- 21:53little bit better to inspect it. Anyway,
- 21:55so back to that home menu. As you can
- 21:57see, there's a variety of different
- 21:58sources that we can connect to and
- 22:00actually use up here in that home menu.
- 22:03Well, we're going to be diving deep into
- 22:04this topic in chapter 3. Specifically,
- 22:07it's focus on Power Query, which is the
- 22:10tool behind the scene to perform ETL,
- 22:12extract, transform, load, and get a
- 22:15variety of different sources, clean it
- 22:16up, and use it, and use it all within
- 22:18that Power Query editor.
- 22:22All right, we're going to jump real
- 22:23quick away from the ribbon because as
- 22:25you can see, we have a few different
- 22:26options available. But now that we
- 22:28covered that home, I want to jump into
- 22:29these other panes of filter
- 22:31visualizations and data. Let's focus on
- 22:34visualizations first. As you can see up
- 22:36underneath the section of build visuals,
- 22:39we have a host of different
- 22:40visualizations to choose from. In
- 22:42chapter 2, we're going to be working
- 22:44through pretty much every single one of
- 22:46these so you understand what they can do
- 22:48and their capabilities. So, I'm going to
- 22:50go ahead and click this button of this
- 22:52stacked column chart. It's going to go
- 22:54ahead and throw it into here. I'm going
- 22:56to spread it over the middle. And the
- 22:58visualization right now is blank that
- 23:00showing this gray bars right here
- 23:01showing there's nothing inside of it.
- 23:03Now, underneath these visualization
- 23:05options, you have different options.
- 23:07This is, as you notice, I've h I have
- 23:09the actual graph selected itself. And
- 23:12so, I have this x-axis, y-axis, and
- 23:14legend selected. If I have just the page
- 23:15selected, those go away. I have to
- 23:18actually select the visualization.
- 23:20Anyway, these have field wells and they
- 23:23allow you to put things inside of here.
- 23:26Specifically, over here we have our
- 23:28data. Let's put some data into it. So,
- 23:30I'm going to take job title and drag it
- 23:32on down into the x-axis and it goes into
- 23:35this field. Well, nothing's appearing
- 23:37because we don't have any values. So,
- 23:38I'll need to take now the salary and
- 23:40drag it on down and put it into the
- 23:42yaxis. Now, you may notice the
- 23:44difference between these two. Job title
- 23:46stay the same, but salary changed to an
- 23:49aggregation of sum of salary. It's doing
- 23:52a sum. If I click this down arrow right
- 23:54here, I could actually change it to a
- 23:57host of different things. If I wanted to
- 23:58do count, I could do that. Every one of
- 24:00these has one value inside of there. So
- 24:02that's why it says one. We're going to
- 24:04just go with sum to see keep it easy.
- 24:07Now for the visualization itself,
- 24:09whenever I hover over it, it will
- 24:12actually display information from it.
- 24:14This is called a tool tip. So for this
- 24:16one, I have the data scientist and it
- 24:18tells me that the sum of salary is
- 24:20105,000.
- 24:21And I can scroll over all the other ones
- 24:23to see theirs as well. PowerBI also does
- 24:25this thing where it automatically gives
- 24:27it a title. Right here, it's saying sum
- 24:29of salary by job title. We'll go with
- 24:31that for the time being. Now, that's the
- 24:32visualization. That's the data pane.
- 24:34What happens if we want to filter the
- 24:36data? Well, we can use the filters pane.
- 24:38Now, inside of this, there's two main
- 24:40fields. filters on this page and filters
- 24:42on all pages because right now I'm
- 24:44clicked to the actual page itself. If I
- 24:46click to the visual three things popped
- 24:49up filters on this visual so I'm select
- 24:51that filters on this page and filters on
- 24:53all pages. Let's say there's a case
- 24:56where I just don't for this visual
- 24:58specifically I don't want to see
- 25:00business analysts. I don't really care
- 25:01about it. What I can do is click this
- 25:03expand arrow right here and it has it
- 25:06selected to basic filtering and I can
- 25:08say select all but then remove business
- 25:11analyst. Now I could also do filtering
- 25:14on the salary and I could do it in a
- 25:16dynamic way is less than or greater than
- 25:18a certain amount but we're not going to
- 25:20touch that.
- 25:23Let's now get through the rest of these
- 25:25ribbon tabs. In insert we have different
- 25:28options to insert. Specifically, if I
- 25:30wanted to insert some sort of new
- 25:32visual, I can do that to insert it.
- 25:34Personally, I'm not really a fan of that
- 25:35because then I still have to come over
- 25:37here and then let's say I wanted
- 25:39something like the clustered bar chart.
- 25:41I have to click that for it to change
- 25:43it. So, we have this bar chart in here.
- 25:45Now, let's actually go in and fill it
- 25:46out as well. As you can see, it also has
- 25:48a y-axis and x-axis. Similarly, it's
- 25:51opposite, right? So, I'm going to put
- 25:52job title up in the y ais and then
- 25:56salary down in the x-axis. And as you
- 25:59note, we have four values here because
- 26:01this one where if we look at the
- 26:02filters, we have this filter that's
- 26:04removing business analyst. But when I
- 26:06click this visual, it does not have a
- 26:08filter on it. Anyway, getting back into
- 26:10that insert tab, as we can see, most of
- 26:13these options are methods to insert
- 26:16certain objects into here. Next up is
- 26:18the modeling tab, and this allows us to
- 26:21do things like create measures, columns,
- 26:24tables, and even parameters. Chapter 4
- 26:28is going to be heavily focused on that
- 26:30using DAX for this or data analysis
- 26:33expressions. We're going to touch all
- 26:35those different buttons in that modeling
- 26:37tab, but let's give a demo real quick of
- 26:39it. Quick note, this is the last chapter
- 26:41and the most advanced chapter of this.
- 26:43So, what we're going to cover right now
- 26:44is highly advanced. Don't get
- 26:46discouraged if you're not following
- 26:47along. We're going to repeat it a bunch
- 26:49later. Anyway, I could do something like
- 26:50create a new measure. And inside the
- 26:53formula bar here, let's say I wanted
- 26:55something like the average salary. That
- 26:58would be the name in this case of the
- 27:00measure. And then I could use a DAX
- 27:03function such as average and run this on
- 27:06a column name. Specifically, I want to
- 27:08run this on the salary column. If you're
- 27:12familiar with Excel functions, DAX
- 27:15functions have a very similar syntax,
- 27:17although works a little bit different
- 27:18with data modeling. Cover again in
- 27:20chapter 4. Anyway, go ahead and run this
- 27:22by pressing enter. And when I open up
- 27:24that data pane and look under salary
- 27:27data, I can see now here that we have
- 27:30this measure of average salary. And I
- 27:32can see it that it's also a measure
- 27:34because it has a little calculator right
- 27:35next to it. With this measure, I could
- 27:37do something like if I wanted to put it
- 27:38inside of a card, I have this card here.
- 27:41I could draw average salary to that
- 27:43field. Well, and it looks like the
- 27:45average salary is around 90,000. I don't
- 27:47really want this visual. So, I'm going
- 27:48to click these three dots here and click
- 27:50remove. Next up is the view tab, and we
- 27:53can change our view. Specifically, if
- 27:55you had a certain color format you
- 27:56wanted to use, like dark mode, you could
- 27:59do that. However, we're going to keep it
- 28:01uh light theme for this. We can also
- 28:03change the different layout options.
- 28:05Now, something that's important up here
- 28:07in this views is the show panes. Right
- 28:10now, we have filters selected. If I were
- 28:12to click it again, filters disappears.
- 28:15There's other panes. So, I went over
- 28:17filters, visualization, data, but you
- 28:18also have the bookmark pane, selection
- 28:20pane, performance analyzer, and sync
- 28:22slicers. This gets a mess if you have
- 28:24all these enabled. We're going to cover
- 28:26all of these in upcoming chapters, but
- 28:28for right now, we'll just leave the
- 28:30filters one enabled. Next up is the
- 28:33optimize tab. And the one that I'm
- 28:35finding myself use from time to time is
- 28:37this performance analyzer, which is also
- 28:39a pain that can pop up from here to
- 28:40there. Anyway, like before, remember we
- 28:43had that cross filtering you can do.
- 28:45Sometimes if there's a lot of visuals,
- 28:47you may notice that your report's
- 28:48slowing down. You can actually inspect
- 28:50this by doing going to performance
- 28:52analyzer, selecting start recording.
- 28:54Whenever I click on it, it actually
- 28:56records how long the cross highlighting
- 28:59takes and in this case, how long it
- 29:01takes to undo the cross highlighting.
- 29:03Here it is in milliseconds. Not that
- 29:05much, but I promise you will be build
- 29:06bigger reports. And this will be a great
- 29:08way to find bottlenecks. Last tab up is
- 29:11help. And unfortunately with any type of
- 29:14help ribbon in any Microsoft product, I
- 29:17don't find that it's very useful at all.
- 29:20If I have any sort of comment, I'm
- 29:21typically going to a chatbot such as
- 29:24chat GPT in this case. And it's actually
- 29:27pretty good at going through and telling
- 29:29me how to manipulate all the different
- 29:32fields to make different things in
- 29:33PowerBI. More recently, I've had better
- 29:36luck, especially with PowerBI, using
- 29:38Google's model of Gemini, specifically
- 29:402.5 Pro, especially when it gets into
- 29:43advanced things like DAX and Power
- 29:46Query. I found that it's been pretty
- 29:48realistic in providing me what actually
- 29:50the guey interface is like. Vice Chachi
- 29:52BT sometimes hallucinates it.
- 29:57All right, next up is the file menu,
- 29:59which you can over here on the lefth
- 30:00hand side. This looks very similar to
- 30:02whenever we first open PowerBI except we
- 30:04have some additional features over here
- 30:06such as saving, sharing, exporting, and
- 30:08publishing. I'm going to go ahead and
- 30:10save this report right now. I'll call
- 30:13this chapter 1 intro. It's going to be
- 30:15saving it as a PBX file. Saving this to
- 30:19my desktop. With PowerBI, you need to
- 30:22save often. Sometimes it will end up
- 30:25crashing on you and there's no autosave
- 30:28feature or enablement with it. So
- 30:30practice often just clicking save or
- 30:33control S. One other thing about the
- 30:35file menu. Let's go back into it. And
- 30:36that's down here. And that's in options
- 30:39and settings. If we need to update any
- 30:42options, we're going to go here. There's
- 30:44a host of different things you can go
- 30:45to. But let's say in our case that we
- 30:47enabled that dark mode and we want don't
- 30:49want to do it anymore. Under report
- 30:51settings, I can go to customize
- 30:52appearance and I could change it to the
- 30:54different modes here. Another tab that I
- 30:57find myself frequently using is preview
- 30:59features. Now, since you download from
- 31:01the Microsoft Store, it's going to
- 31:02frequently get updates and you'll get
- 31:04new preview features available. In order
- 31:07sometimes to enable those features, you
- 31:09actually have to go through and select
- 31:11them on whether you want to enable them
- 31:13or not. They're not just going to be
- 31:14enabled by default. This is where you
- 31:16control that. The other thing to note
- 31:17real quick is this on Copilot preview.
- 31:20It says Copilot isn't available because
- 31:22you're not signed in. I'm going to go
- 31:23ahead and close out of this and go to
- 31:25home. You can see you have copilot up
- 31:27here. If I go try to click it, you're
- 31:29going to have to enter a work or school
- 31:31email address that has a PowerBI service
- 31:34associated with Copilot access. I don't
- 31:36have this enabled. And so that's why I'm
- 31:38recommending CHBT and Gemini. During
- 31:40this course, we're basically not going
- 31:42to be able to use Copilot at all because
- 31:44you basically have to pay for it and
- 31:46there's so many other free options out
- 31:47there. I'm not paying for it. All
- 31:51right, last thing to cover is all the
- 31:53different views. We're spending a lot of
- 31:55time looking here at this report view.
- 31:58We also have the table view where we can
- 32:00actually view our data. Notice here our
- 32:02salary column right now is formatted
- 32:06using general formatting. We can
- 32:08actually format it as currency which if
- 32:10we go back to that report view, we can
- 32:12see that that sum of salary here and sum
- 32:14of salary here isn't using currency. So
- 32:18under table view, I can select that
- 32:20salary column and I can make it into
- 32:23currency. And now that that's enabled,
- 32:26whenever I go back to my visualization,
- 32:28it actually updates all the different
- 32:30ones that are attached to it with
- 32:32currency. Pretty neat. So this data view
- 32:34is not only great for viewing our data,
- 32:35but also cleaning it up. Next up right
- 32:38here is our model view. And what this is
- 32:42showing is our model. Right now, we only
- 32:44have one table inside of here, and it
- 32:47has our two columns along with our
- 32:49measure. Now, this is a sneak peek of
- 32:51the file of the last lesson that we're
- 32:53going to be doing, and we're going to be
- 32:55building a pretty complex data model by
- 32:57the end of this, seeing how it all works
- 33:00together. So, this view is really great
- 33:02at understanding how all these different
- 33:04tables in this case interact with each
- 33:07other. Right now, in our current file,
- 33:08pretty useless. All right, the last view
- 33:11is the DAX query view. This is actually
- 33:13a newer view that was introduced
- 33:15recently. But anyway, if I wanted to do
- 33:17something like look at the salary data
- 33:18and go to quick queries. I rightcicked
- 33:20that by the way. I could show the top
- 33:23100 rows, but I'd argue that that data
- 33:25or that table view is actually better
- 33:27for this. The other option I have here
- 33:29is I can rightclick it, go to quick
- 33:31queries, I could go to column
- 33:33statistics, which I actually do find
- 33:35useful in that it provides statistics
- 33:37about the different columns in the data
- 33:39set. You can get a holistic view really
- 33:42quick. Anyway, the results appear in
- 33:43this table below and it automatically
- 33:47generates the DAX is all DAX right here
- 33:49above this. So, you don't really need to
- 33:51know understand what's going on whenever
- 33:53you're going through this. You can just
- 33:54get the results you need. I could even
- 33:56do something like if I want to look at
- 33:57average salary and going under quick
- 34:00queries, I can go into something like
- 34:02define and evaluate and it has the DAX
- 34:05here in order to look at this measure
- 34:07and what is the value here. Anyway, like
- 34:09I mentioned, this is going to be the
- 34:11focus in chapter 4 on DAX. This is just
- 34:13an intro to get you understanding what's
- 34:16going on here, but in no way do you
- 34:17understand what's going on with these
- 34:19formulas here. All right, so that's the
- 34:21grand tour to PowerBI. Once again, don't
- 34:24be discouraged if you didn't follow
- 34:26along with every little thing that I did
- 34:28there. Every single step that I did
- 34:30during this, I'm going to be repeating
- 34:32not only in the next lessons, but also
- 34:34in the next chapters coming on. This was
- 34:37only done to basically show you a
- 34:39holistic view of what the PowerBI app is
- 34:42actually capable of. I promise you we're
- 34:44going to go over everything again. All
- 34:46right, for those that purchase the
- 34:48supporter resources, first of all, thank
- 34:49you. Second of all, you now have some
- 34:51practice problems to go through and get
- 34:54more familiar of the UI in PowerBI. In
- 34:57the next lesson, we're going to be
- 34:59jumping into building our very first
- 35:01dashboard. With that, I'll see you
- 35:03there.
- 35:08All right, welcome to this lesson on
- 35:10building your first dashboard in
- 35:11PowerBI. Purpose once again is not for
- 35:14you to become a master of this, but more
- 35:16for us to understand the PowerBI app,
- 35:19its capabilities, and what it's capable
- 35:21of. The dashboard they're building is
- 35:23pretty simple actually. Let's check it
- 35:24out. Here I am inside the PowerBI app
- 35:27with our final dashboard and it's going
- 35:30to be using the jobs data set that we're
- 35:34going to be using for a large portion of
- 35:36this course and specifically we have
- 35:39some attributes showing we have a title
- 35:41up at the top three cards displaying the
- 35:43job count average yearly salary and then
- 35:46also average hour salary for the jobs
- 35:50that we have selected. Specifically, we
- 35:52have three jobs in here of data
- 35:54engineers, data analysts, and data
- 35:56scientists. And with that, we have a map
- 35:59too displaying it. Be able to see it
- 36:01throughout the world. And we can zoom in
- 36:03on different locations on where
- 36:05different job postings are located at.
- 36:10But before we dive into that, we need to
- 36:12dive a little bit deeper into
- 36:14understanding what are the different
- 36:16data sources we can import in and
- 36:19actually visualize in PowerBI. Now,
- 36:21there's hundreds of different sources,
- 36:22but I like to break it down into four
- 36:24major types. The first are files such as
- 36:27Excel or CSV files, which we're going to
- 36:29demonstrate. You could also do things
- 36:31like databases or cloud services such as
- 36:34Salesforce, maybe even Snowflake. And
- 36:36then finally, the other major one are
- 36:38web sources, which we will demonstrate
- 36:41in a later chapter. In a real world
- 36:43scenario, the most popular of these is
- 36:46going to be either something like a
- 36:47database or a cloud service that
- 36:50probably hosts something like a database
- 36:51inside of it. For example, let's take my
- 36:54app data.te.
- 36:56This aggregates jobs across the world
- 36:59and right now I have 3.6 million jobs in
- 37:03it. Here I am logged onto my Google
- 37:06Cloud account. I host this data in Big
- 37:09Query. Don't worry, you don't need to
- 37:10know anything about it. This is
- 37:11demonstration only. Anyway, I host these
- 37:143.6 million jobs inside of here. And
- 37:18this is where I'm extracting the data
- 37:21from to load into data.te.
- 37:24And so, let's just demonstrate how easy
- 37:26it is to connect to something like this
- 37:28BigQuery database. This is for
- 37:29demonstration only. You don't have
- 37:31access to the database. I'm not giving
- 37:32it to you. It would cost too much money
- 37:34to give it to everybody out there. So,
- 37:36it's demo only. In the ribbon under the
- 37:38home tab, I can go to get data and they
- 37:40have a variety of sources, but I'm going
- 37:42to go to more. Inside of here, I know
- 37:44it's a BigQuery database. So, I'm going
- 37:46to search for BigQuery, and I'm going to
- 37:48go with this first option right here.
- 37:50I'm going to click connect. Now, anytime
- 37:52you're connecting to a database, there
- 37:54could be multiple different tables
- 37:56inside of there. You could specify a
- 37:59different table, a different project, or
- 38:01even a specific SQL statement that you
- 38:04want it to run in order to extract
- 38:05certain data. I'm going to just go ahead
- 38:07and leave all this blank, and click
- 38:09okay. From there, it's going to prompt
- 38:11me to go and sign in into my BigQuery
- 38:14account. So, I have to log through
- 38:15Google, do my different signin. Then,
- 38:18once that's complete, I can go ahead and
- 38:20actually connect because I've now
- 38:22authorized my credentials to go through
- 38:24with this. Now, this navigator window
- 38:26pops up and I have access to all these
- 38:30different projects within BigQuery. You
- 38:31don't need to understand that. I'm just
- 38:32going to go in and actually select now
- 38:34the table that I want access to.
- 38:36Specifically, it's this one right here.
- 38:38I can scroll through and see all the
- 38:40different columns with it. Comparing
- 38:42those columns to what I see here in
- 38:44BigQuery, I know that I got the correct
- 38:46table. Now, all I have to do now is just
- 38:48go forward with loading the data in. And
- 38:51I can see the data loaded in because
- 38:52it's got this table over here on the
- 38:54right hand side. Now all I want to
- 38:56figure out is how many different rows
- 38:57are in this data set. So I can just drag
- 38:59any old field. I'm going to drop this ID
- 39:01field over here. Set the aggregation to
- 39:03count. And bam, we have 3.62
- 39:08million jobs at our fingertips in
- 39:11PowerBI right here. If you remember from
- 39:13data nerd.te, that's exactly how many
- 39:16jobs we have in there. So we have access
- 39:17to all the different data there. I say
- 39:19we, I don't necessarily mean you. We're
- 39:22actually going to access some different
- 39:23data. All right, here I am inside of our
- 39:25course folder. And as you recall, we
- 39:27have all the different chapters up here.
- 39:29Then I have this one folder on data.
- 39:31We're going to be using all this
- 39:32different data throughout the course,
- 39:34but specifically for this lesson, we're
- 39:36going to be focusing on this job posting
- 39:38flat, and it's actually a CSV or a
- 39:42commaepparated values file, but if you
- 39:45have Excel, it can open up inside of
- 39:47that. This data set has job postings
- 39:49from 2024. If we scroll on down to the
- 39:52bottom, we can see that we have around
- 39:55478,000.
- 39:57Not that 2.6 million cuz remember my
- 39:59data set goes back multiple years. I
- 40:01didn't want to break a computer, so
- 40:02that's why we limited only to 2024.
- 40:05Anyway, this is the data set on job
- 40:06postings that we want. Let's go ahead
- 40:08and import it in. For this, we're going
- 40:10to start with a blank PowerBI file. So,
- 40:13I'm just going to pop it open and we're
- 40:14going to select blank report. Now we're
- 40:16going to get data. Now it's not Excel
- 40:19workbook. This is a CSV file or
- 40:21commaepparated values. So instead we're
- 40:24going to come down here and we're going
- 40:25to select text CSV. I'm going to
- 40:27navigate into where that project folder
- 40:29is into data and then into job postings
- 40:32flat and then click open. As we just
- 40:34looked at that other file, we can see
- 40:36that this file in this navigator window
- 40:39is a lot similar or is similar to what
- 40:42we saw previously. It looks like
- 40:44everything's importing specifically. I
- 40:45want to make sure that it has the
- 40:46columns updated correctly. Other than
- 40:48that, looks good. This is just a data
- 40:50preview and it shows only the first 200
- 40:52rows. So, we can either load it, which
- 40:53is going to load it in, or transform
- 40:55data. You can go ahead and click load,
- 40:57or if we were to click transform data,
- 40:59this is going to be opening the Power
- 41:01Query editor, which we have a whole
- 41:04chapter on this in chapter 3, going over
- 41:06how to interact with this completely new
- 41:09guey that has all the different ribbons
- 41:10up here. It's completely different than
- 41:12what we've seen. Don't worry about that.
- 41:13If you happen to open this up, all you
- 41:15got to do is hit close and apply right
- 41:18here. It's the same as clicking load,
- 41:20and we're going to load the data set in.
- 41:22Depending on the size of your data set,
- 41:24this one's not too big. It could take
- 41:26anywhere from a few seconds to I've had
- 41:28data sets take a few minutes. And we can
- 41:31verify that we've loaded it into this
- 41:33PowerBI app by going over to that data
- 41:34pane, selecting down on job postings
- 41:38flat, the name of this. We can see all
- 41:40the different columns inside of this
- 41:42data set.
- 41:46Anytime you import any data in, you want
- 41:48to verify it imported incorrectly and
- 41:50you want to inspect it. So, I go
- 41:52automatically into this table view.
- 41:55There's a few columns I want to call out
- 41:56real quick. Job title short is the main
- 41:59column we're going to focus on. You
- 42:00notice next to it, we also have this
- 42:02other job title column. But if I click
- 42:04this drop-down arrow here, we can see
- 42:08that there's a host of different oh my
- 42:10gosh, there's so many different real job
- 42:13titled names. However, when we look at
- 42:15job title short, there's only 10
- 42:18distinct names and they revolve around
- 42:21like data an data analyst, data
- 42:23engineers, data scientists. Anyway, for
- 42:24the majority of this course, we're going
- 42:26to be primarily focus on the job title
- 42:28short column. Other things we're going
- 42:30to be caring about, especially for this
- 42:32lesson, is the job country. And I'm
- 42:35scraping this data from around the
- 42:37world. So, we have all these different
- 42:38countries in here. And then also this
- 42:41salary data. Right now, you can't see
- 42:43any salary data because some of it is
- 42:44blank. But if I were to sort this column
- 42:47in, let's say, descending order, I can
- 42:49actually start to see some of the
- 42:51different values in there. Same thing
- 42:53for looking at salary, our average. I
- 42:56can see these values as well. Quick
- 42:58backstory on why we have these called
- 43:00salary year average and salary hour
- 43:03average. If we actually look at the core
- 43:05data set inside of BigQuery, I actually
- 43:08have columns depending on how the
- 43:10salaries are reported in a job posting.
- 43:12It could have a min value and a max
- 43:15value. So what I do in this case between
- 43:1760,000 120,000 I average it and
- 43:20therefore we get 90,000 for the salary
- 43:23year average. This just makes it a lot
- 43:26easier for you. But I want to give you
- 43:27the backstory of why the column's name
- 43:29like this. Anyway, similar to how I'm
- 43:31going through anytime I import a data
- 43:33set, I'm checking it out. I'm also going
- 43:34to be cleaning it up as we go. In this
- 43:37case, salary, hour, average. I can see
- 43:38it's formatted right now using just
- 43:41general. I want to format it as
- 43:42currency. So, I'm going to click this
- 43:43currency icon. And then also, since it's
- 43:46hour, I want to have a decimal place.
- 43:50Specifically, I want two decimal places.
- 43:52Now, I also want to format salary or
- 43:54average. I want to be able to see it.
- 43:55So, I'll sort descending and then format
- 43:57it as currency. I don't need any decimal
- 44:00places for this. It says auto, but
- 44:02sometimes it will give decimal places.
- 44:03So, I'm going to just put it to zero.
- 44:05Now, every other column in here looks
- 44:07fine to me. I'm okay with it. But I do
- 44:10like to also go inside of the model view
- 44:13anytime and inspecting. Make sure that
- 44:15the model is inspected or imported
- 44:17correctly. And if it's connected to any
- 44:19tables, it's connected properly. Right
- 44:21now, we just have one table of job
- 44:22postings flat. So, everything's looking
- 44:24good.
- 44:27So, as a reminder, we're going to be
- 44:28building this dashboard right here.
- 44:31We're going to focus on first building
- 44:32these three cards, two visuals
- 44:34underneath it, and then putting the
- 44:36title up at the top. Right now, this
- 44:38visual because I'm not signed in. I was
- 44:40signed in previously. I'm not signed in.
- 44:42You're not probably signed in either.
- 44:44This map right here that normally I have
- 44:47here is not it's disabled. We need to
- 44:50enable it. And it gives instructions for
- 44:52this. Now, let's walk through this and
- 44:54actually enable this so when we get to
- 44:56the map section, we know it's going to
- 44:57work properly for you. So, inside your
- 44:59notebook, we're going to go into file
- 45:01and then options and settings and click
- 45:04options. And then underneath global, it
- 45:06was telling us to go into security.
- 45:09Underneath this, we want to enable the
- 45:12different maps. So, this map and field
- 45:15map visual should be enabled. We also
- 45:18want to enable this one on ARJS for
- 45:20PowerBI. If it isn't enabled, it's also
- 45:22a map. We'll be covering that in the
- 45:23maps lesson in an upcoming chapter.
- 45:25Anyway, click go ahead and click okay.
- 45:27And in my case, with the dashboard
- 45:28already built, I can now see the map
- 45:30visual. You don't have map visual built,
- 45:31but you will see it built whenever you
- 45:33build it. If for some reason it doesn't
- 45:35work when you go to build it, all you
- 45:36got to do is close out of PowerBI. I'm
- 45:37going to open it back up. Anyway, let's
- 45:39create those three cards first. So, I'll
- 45:41go ahead and throw a card up here, and
- 45:43I'm going to minimize out of this to try
- 45:45to make this as big as possible. The
- 45:47first thing is we want to count. Anytime
- 45:49we're doing count, normally you want to
- 45:50use some sort of ID column. We don't
- 45:53have an ID column in a data set. So all
- 45:55every time that I do count throughout
- 45:57this entire course, you're going to see
- 45:59me throw the job title short inside of
- 46:01here. Now, one thing to note about this,
- 46:04this is showing job title short, but
- 46:06it's saying first job title short inside
- 46:09of this fields. Well, what I've done
- 46:11thrown it into the aggregation method
- 46:13that it's doing, it's doing first. If I
- 46:16click this down arrow on it, I can
- 46:19change the aggregation method to
- 46:20something like last or to count
- 46:23distinct. In this case, there's only 10
- 46:25job title shorts or count. And bam, this
- 46:29shows us all the different counts of the
- 46:31rows in this data set. 478,000.
- 46:35And I want this card right here. And
- 46:36then I'm going to want the two others
- 46:38next to it. So I'm actually going to
- 46:39select it and press Ctrl C. And then
- 46:42clicking inside of here to make sure the
- 46:44visual is not selected. I'm going to
- 46:46press commandV and it's going to repost
- 46:48it. And what I can do is I can drag it
- 46:50until it's centered in the middle and
- 46:52centered on this visual as well. Once
- 46:54again, I'll click outside of that. Press
- 46:56commandV and take the next one over
- 46:58here. Make sure it's aligned up
- 47:00properly. And bam. Okay, this one we
- 47:03want the average yearly salary. So, all
- 47:06I'm going to take is that salary year
- 47:08average column, drag it right into the
- 47:10fields. It's going to replace it. Now
- 47:12notice it automatically did for the
- 47:14aggregation sum sum of salary. Once
- 47:18again we can go in and then change it to
- 47:21what we want whether we want something
- 47:23like the average or median. We'll go
- 47:25ahead with average. Now with these type
- 47:28of aggregations that are happening
- 47:30automatically I can go into that table
- 47:32view and then I can select a column.
- 47:34Selecting salary or average I can see
- 47:36that the summarization automatically
- 47:38goes to sum. In our case, I'm going to
- 47:41change it to something like average.
- 47:44Same thing for salary hour average. I'm
- 47:46going to change that one to
- 47:46automatically to average. And now when I
- 47:49go back, I want to change this one now
- 47:51to use the salary hour average column. I
- 47:54drag it in. It automatically does
- 47:57average. Now let's build these two
- 47:59charts underneath a bar chart and then
- 48:00the map chart. For this, we can select
- 48:02either the stacked bar chart or the
- 48:05clustered bar chart. We're not doing
- 48:07multiple values, so it doesn't really
- 48:08matter on each. I'm going to go ahead
- 48:10and move it and position it so it's
- 48:11taking up this bottom half. In this, we
- 48:14want to count the different job titles.
- 48:17So, I'm going to take that job title
- 48:19short to the y-axis and then take also
- 48:22job title short to the x-axis, which
- 48:25it's going to aggregate automatically by
- 48:27count. The next visualization to put up
- 48:29is the map, and it's located right here.
- 48:31It's called map. But I'm going not want
- 48:33you to watch something. If I click map,
- 48:35it actually changes that visual that I
- 48:38had selected. So, I'm going to press
- 48:40Ctrl +-Z to undo that. Or you can just
- 48:43come up here and click undo last action.
- 48:45Anytime you're adding a new visual, you
- 48:47want to make sure you're clicked out of
- 48:48it. And then click map. And then I'll
- 48:51just drag it to make sure that it's in
- 48:53the center where I want it to be. Once
- 48:54again, we want to see counts of jobs by
- 48:57location. So, we're not going to use
- 48:58that job location. And we're going to
- 48:59aggregate by country because it's more
- 49:02distinct in what it offers. And when I
- 49:04drag this in, it's not loading. It's cuz
- 49:06I need to restart PowerBI. Also, I've
- 49:07noticed I haven't saved my file yet. So,
- 49:09this is a good time to save the file.
- 49:11So, I'm just going to save with the
- 49:12title of something like jobs dashboard.
- 49:14And then all I do is I'm going to
- 49:15rightclick the PowerBI icon down there.
- 49:17Some recent files going to come up and
- 49:19just going to open up jobs dashboard
- 49:21directly. That bottom map visual is
- 49:22working because we enabled it in
- 49:24options. We just had to restart PowerBI
- 49:26to get it to work. Anyway, right now
- 49:27it's showing all the different
- 49:28countries. Like this right here is
- 49:30United States. This bad boy up here is
- 49:32the Canadians. But what I want in this
- 49:34is actually well, I need to actually
- 49:36click in this map visual is we have the
- 49:39locations, the legend, latitude,
- 49:41longitude, and then bubble size. I want
- 49:43the bubble size to be the size or the
- 49:46count of the different jobs. Once again,
- 49:48we're going to use that job title short
- 49:50column and use the counts of that. And
- 49:54now we can see this. Now, this visual is
- 49:56actually a little hard to see. Anytime
- 49:58you want to expand visuals, up here in
- 50:00the top, they have this focus mode, and
- 50:03it allows you to drill into a certain
- 50:05visualization. And now I can see it a
- 50:07lot more up close. Can zoom into it,
- 50:10scroll around. It makes it a lot easier
- 50:11to use. Anyway, scrolling over something
- 50:13like the United States, I see that it
- 50:15has around 140,000 job postings in it.
- 50:19All right, so let's go back to the
- 50:20report. All right, last thing we need to
- 50:21do is put a title up at the top.
- 50:24Navigate to the insert tab. I'm going to
- 50:25go to insert a text box. And I'm going
- 50:28to reposition this across the top up
- 50:31here. I'll just give a simple title like
- 50:33data jobs dashboard. And this is only a
- 50:36size 10 font. This isn't really going to
- 50:38work for what we need. I bump this bad
- 50:40boy up to 60. Put it at bold. I'm also
- 50:42going to center it. Also going to make
- 50:44the title a little less dark. We'll do
- 50:47this uh black 20% lighter. So, bam. Not
- 50:51looking too bad. just need to do some
- 50:52cleanup now.
- 50:56So, the first thing we're going to focus
- 50:57on with this is formatting the page
- 51:00itself, not necessarily the visuals. And
- 51:02to make sure I'm formatting the page
- 51:04itself, you need to click down here,
- 51:06make sure no visuals are selected. And
- 51:08what I can see over on this
- 51:10visualizations pane is we have format
- 51:12your report page. However, if I'm
- 51:14clicked inside of a visual, it's going
- 51:16to have format visual or analytics or
- 51:19whatnot. We want the page. So, we click
- 51:22into the page format for report page. I
- 51:25can change things like the page
- 51:26information such as page one or I can
- 51:29even change it down here. I'm going to
- 51:30change it to data jobs and press enter.
- 51:33Also updates right here. Other common
- 51:35things that I control inside of here are
- 51:37things like the canvas settings. Right
- 51:39now, it's at a 16.9 ratio. You could
- 51:42change it to something like a letter. I
- 51:44typically leave it as 16x9. The other
- 51:46thing that I find myself altering is the
- 51:48background. If I'm doing some sort of
- 51:50formatting and I want a specific color,
- 51:52I could change it to something like
- 51:54black. If I want this to work though,
- 51:56the trans. So, right now, actually, I
- 51:58have to move this over and to be able to
- 52:00actually see the back of here. Anyway,
- 52:03this is format black, but it's still, as
- 52:05I can see back here, because I'm
- 52:07clicking on there whenever I go to it,
- 52:09it's still not showing. It's because the
- 52:11transparency is at 100%. I have to take
- 52:14the transparency off and I can see, oh,
- 52:16here's black along these edges or
- 52:18whatnot. I don't want it to be black. I
- 52:19just want to show you that's a common
- 52:20way to do it. Now, after format page,
- 52:23the other thing to know is format
- 52:24visual. So, I can click on a visual and
- 52:26see that hey, it now says format visual.
- 52:29There's only two major things of a card.
- 52:31The callout value and then the label.
- 52:33The label I can toggle on or off. And
- 52:36opening up, I can change things like the
- 52:38font size and even the color of the
- 52:40font. I'm going to leave it like it is.
- 52:42For the category value, I'll make it a
- 52:44little bit bigger. I'll make it 50. Now,
- 52:46what's really neat is if I click on a
- 52:48similar visual. So, in this case, this
- 52:50other card, it will also open to that
- 52:53spot as well. So, it makes it quickly or
- 52:55easy for us to now go in change this one
- 52:56to 50. I select this one and I'm going
- 52:59to change this one as well to 50. Also,
- 53:01while I'm in here, I want to format the
- 53:02decimal places showing. I'm fine with
- 53:04the two decimal places for the hour. The
- 53:06yearly, yeah, we did format it earlier
- 53:08to show zero, but now it's doing an
- 53:09aggregation, so it goes resorts to two.
- 53:12So, I'm going to change the value
- 53:14decimal places to zero for this one and
- 53:16also for the count. All right, let's
- 53:19move on to these other visuals to clean
- 53:20them up. I'm going to go into this bar
- 53:22chart. I'm going to go into focus mode
- 53:24to make it a little bit easier to
- 53:25actually see it. In this view, I can
- 53:27also format my visual and go into
- 53:29analytics. We'll get to analytics
- 53:30eventually. Now, we can control things
- 53:32like the y x-axis grid lines. Let's go
- 53:34into the yaxis first. You could turn off
- 53:37something like the values, but I think
- 53:39they're pretty much necessary. I will
- 53:41say the uh the title here of job title
- 53:43short off to the left hand side not
- 53:46necessary so I'm going to turn that off.
- 53:48We're going to be giving this
- 53:48visualization a title. So I don't feel
- 53:50it's necessary. Anytime it's not
- 53:52necessary I'm going to remove it. Going
- 53:54into something like the x-axis I could
- 53:56set something like a minimum and maximum
- 53:58range. I could also adjust the values to
- 54:01be a bigger font or a smaller font.
- 54:04Overall it's looking good for x-axis.
- 54:06The other thing is grid lines right
- 54:08here. Right now they have vertical grid
- 54:10lines. I never really find grid lines to
- 54:13be that helpful and they are I find
- 54:14distracting. So I'm going to go ahead
- 54:16and just turn those off. Now that's
- 54:18enough with everything with the visual
- 54:20portion. We can now go into general.
- 54:22This holds values that we can affect
- 54:24such as the title data formats or even
- 54:26things like the tool tips. Remember tool
- 54:28tips are whenever you hover over you
- 54:30actually see the values or whatnot.
- 54:32Anyway, the first thing I want to change
- 54:33is up here at the top. I want to change
- 54:35the title. I typically like to have a
- 54:38descriptive title or a title that's
- 54:40asking a question. So, I'm going to give
- 54:42it this of what are top data jobs. Now,
- 54:45if I try to adjust this right here, it's
- 54:48not going to really do anything in this
- 54:49view that we're doing. I'm going to go
- 54:51back to the report to actually see
- 54:52what's going on. I'm going to change the
- 54:54title to a 20oint font to make it a
- 54:56little bit bigger. And then also, I'm
- 54:58going to center it. Next is the map
- 55:01chart. And there's not a lot of things
- 55:02that we need to go on except for the
- 55:04title. I don't really like it. I'm going
- 55:06to update it to where are data jobs. Put
- 55:08it to that 20 point and then also center
- 55:11it. Now there's one other or multiple
- 55:14minor little things that I want to
- 55:15update on this and that are well that is
- 55:18all the different labels associated with
- 55:20this because right now we have count of
- 55:22job title short that kind of label
- 55:25especially for a stakeholder they may
- 55:26like they may like what the heck is
- 55:28that? We need to have something that's
- 55:29more descriptive. The easiest way to
- 55:32rename this is pretty simple actually.
- 55:34We're going to click on the visual that
- 55:35we want to go to and then you go to the
- 55:38field well associated whatever it is and
- 55:40in this count case I'm going to double
- 55:42click on this and I can now alter this.
- 55:44I can select this all and I want it to
- 55:47be something simple such as job count.
- 55:49Press enter. Now when somebody comes
- 55:51here they can go like oh yeah this is
- 55:53job count. I'm going to update all the
- 55:54rest of these as well with these now
- 55:56being updated to average yearly salary
- 55:58and average hour salary. The only other
- 56:00thing that I'm seeing is here on this
- 56:02bar chart and I'm not liking this count
- 56:04of job tiles short. So, I'm going to
- 56:06change this to job count. Now, one thing
- 56:09to note when I actually scroll over this
- 56:11to look at a value, I have my tool tips
- 56:14pop up and it's still going to say this
- 56:16the column of job title short for the
- 56:19value and then job count. So, I do
- 56:21recommend anytime you're doing any of
- 56:23these to update every single value that
- 56:25may appear on a tool tip. So I updated
- 56:28to job title and now when I scroll over
- 56:30it says job title job count. Similarly I
- 56:33updated the map visual now and when I
- 56:35scroll over this tool tip I see country
- 56:37United States job count 140,000.
- 56:42Last thing to get into is filtering the
- 56:44data down to what is applicable to our
- 56:47stakeholders. In this case I know that
- 56:49my audience only really cares about data
- 56:51engineers, data analysts and data
- 56:53scientist. Now, if you recall back from
- 56:55the last lesson, we can go into that
- 56:57filters pane and it allows you, if I'm
- 56:59selecting on a visual, to apply a filter
- 57:02on a visual. So, in this case, I could
- 57:04go through and select those three of
- 57:07data analyst, data engineer, and data
- 57:08scientist. However, as you saw as I did
- 57:11that, none of these other cards or none
- 57:14of these other visuals updated with
- 57:16this. So, I don't want to do this. I can
- 57:19come up here and select clear filter.
- 57:21Selecting onto the page itself. I can
- 57:24see I have filters on this page. All I
- 57:27need to do is drag this job title short
- 57:30over here. And in this case, select data
- 57:33analyst. You see everything updated.
- 57:35Data engineer and data scientist. Okay,
- 57:37that's looking good. And I can close out
- 57:40of this. So looking good. Now we can
- 57:43have some data nerd come to this and
- 57:46hopefully in the way that we've built
- 57:48it, they can get some common
- 57:49characteristics out of this. They can
- 57:51see the different counts, what the
- 57:52average yearly, what the average hourly
- 57:54salary is. If they wanted to, they could
- 57:56drill into just data analyst to see what
- 57:58the job count is, where the different
- 58:00salaries, and where they are around the
- 58:02world. In the next lesson, we're going
- 58:05to be going through now uploading this,
- 58:08you pressing this publish button button,
- 58:10and putting it into the PowerBI service.
- 58:13And we'll give more details on that in
- 58:15the next lesson. All right. All right,
- 58:17for those that purchased the supporter
- 58:18resources for this course, you have some
- 58:20practice problems to go through and get
- 58:22more familiar with the guey of PowerBI.
- 58:26And with that, I'll see you in the next
- 58:28lesson.
- 58:32Welcome to this final chapter in the
- 58:34grand tour of PowerBI. Specifically, in
- 58:36this, we're going to be focusing on the
- 58:37PowerBI service and understanding how
- 58:40you can actually go about sharing your
- 58:42dashboards and how you're actually going
- 58:44to share it in the real world. Now, for
- 58:46the first half, I'm going to give you
- 58:47the background on the PowerBI service.
- 58:49I'm actually going to walk you through
- 58:51the service here on my computer, show
- 58:53you what it's actually all about, and
- 58:55then next, we're going to get into
- 58:57understanding what are the different
- 58:58licenses you need to access the PowerBI
- 59:01service. Now, a little bit of a spoiler
- 59:04alert. You'll only be able to access the
- 59:06free account from PowerBI if you have a
- 59:10work or school email account. those that
- 59:13have only just something like a Gmail
- 59:15account like me, you can't register and
- 59:18get a free account. You actually have to
- 59:19pay for the PowerBI pre uh pro service.
- 59:22Anyway, we'll get to that when we get
- 59:23there. Anyway, I give that as a spoiler
- 59:26because in the second half, we're
- 59:28actually going to go through and I'm
- 59:30going to purchase a pro account and show
- 59:33you how to set up an account so that we
- 59:35can get our dashboard into the PowerBI
- 59:38Pro service. And from there, we can do
- 59:40things like share it to the internet for
- 59:42anybody without even PowerBI to use,
- 59:45which you can check out the final
- 59:47dashboard for this entire course at the
- 59:49link below. That dashboard is hosted on
- 59:53the PowerBI service and it makes it
- 59:55accessible to anybody that accesses that
- 59:57link. Anyway, we're going to be going
- 59:59through all of that, setting it up if
- 1:00:01you want to. PowerBI Pro purchasing of
- 1:00:04that is not required to complete this
- 1:00:06course whatsoever. But it is good for
- 1:00:09you to go through and understand how to
- 1:00:11use this because like I said, you're
- 1:00:13going to be using this in the real
- 1:00:14world.
- 1:00:17All right, before we just dive head
- 1:00:18first in the PowerBI service and explain
- 1:00:20that, you first need to understand what
- 1:00:23are the different methods to share a
- 1:00:25PowerBI report. And overall, I found
- 1:00:28that there's two main ones. The first is
- 1:00:31sharing the PowerBI file itself. And the
- 1:00:35second one that we're going to get to
- 1:00:36for the remainder of this is the PowerBI
- 1:00:37service. I do want to let you know that
- 1:00:39this is an option. With the PowerBI file
- 1:00:42or PowerBI report, there's no account
- 1:00:45needed. You don't need any type of
- 1:00:46license or prolic. The con, however, is
- 1:00:50you as obviously building it need a
- 1:00:52PowerBI desktop and whoever you send it
- 1:00:54to has to go and download PowerBI
- 1:00:56desktop. So this PowerBI report that we
- 1:00:58have has everything we need in order to
- 1:01:01send it. This data and everything is
- 1:01:03actually all inside of it. So we only
- 1:01:05need to send this file. Going to the
- 1:01:07file of jobs dashboard. I just want to
- 1:01:09show it's about 19 megabytes with all
- 1:01:12the data. It's not that big. So it is
- 1:01:15possible for you to go through and
- 1:01:17actually just email to somebody else and
- 1:01:19then for the open it up and be able to
- 1:01:20use this. However, whenever I was
- 1:01:22working for like Mr. beast. We use the
- 1:01:25PowerBI service in order for everybody
- 1:01:28on my team to go to a central location
- 1:01:32location to access a different PowerBI
- 1:01:36dashboard. It ensures that there's a
- 1:01:38single source of truth and so everybody
- 1:01:41can access the same thing and ensuring
- 1:01:44that they don't have something that's
- 1:01:45out ofd, some file that shouldn't be
- 1:01:47used anymore. The drawback to this is
- 1:01:49that anybody that needs access to this
- 1:01:52needs to have a PowerBI account.
- 1:01:58All right, so let's jump into the
- 1:01:59PowerBI service. Once again, you don't
- 1:02:01have an account yet, so you can't log
- 1:02:03into this. This is more of a demo
- 1:02:04purpose, so that way if you do or don't
- 1:02:06decide to pursue getting an account, you
- 1:02:08know what you're actually getting
- 1:02:09yourself into. Anyway, I'm here at
- 1:02:11app.powerbi.com.
- 1:02:13This is my home screen and similar to
- 1:02:15how PowerBI looks like you open it up,
- 1:02:17they have things like, hey, you can
- 1:02:19scroll down here and get to your recent
- 1:02:20files. So, one of the key features
- 1:02:22inside of here is I can access a report.
- 1:02:25Let's actually look at our dashboard.
- 1:02:27Uh, future Luke has uploaded it into the
- 1:02:29system and it's available inside of
- 1:02:32here. Anyway, it's displaying all the
- 1:02:34different information that we had
- 1:02:35previously. I can even interact with it
- 1:02:37like we did and it still has all the
- 1:02:40different information that we need with
- 1:02:41it. In here, I can do other things by
- 1:02:43going up to the file menu. I could
- 1:02:45download this file and use it locally. I
- 1:02:47can manage permissions of who has access
- 1:02:49to this dashboard within my company. I
- 1:02:52could waste a bunch of paper and print
- 1:02:53it. And I can even do this, which we're
- 1:02:55going to be doing later, is embed the
- 1:02:57report. Specifically, I like to do this
- 1:02:59of publish to web. This provides us with
- 1:03:03an embedded code that we can either link
- 1:03:05that we can send something like an email
- 1:03:08or you could post it inside of a
- 1:03:10website. I'm going to go ahead and just
- 1:03:12copy this link. And then here inside of
- 1:03:14an incognito window, so I'm not logged
- 1:03:17into anything in this window, I can
- 1:03:19paste in this link. And then when I
- 1:03:22navigate to it, I'm able to access this
- 1:03:25dashboard and anybody with this link can
- 1:03:27access the dashboard, go through it, and
- 1:03:29actually filter down, use tool tips, and
- 1:03:32actually be able to interact with our
- 1:03:34data. Now, there's a few other features
- 1:03:36I want to call out real quick inside the
- 1:03:37PowerBI service. Over here on the lefth
- 1:03:39hand side we have create. This gives you
- 1:03:42the option to build PowerBI reports
- 1:03:44without even installing the desktop and
- 1:03:46doing it here. Do not do this. Highly
- 1:03:48don't recommend it. It's not as
- 1:03:50functional. Build in the desktop app and
- 1:03:52then upload to the service. Next is
- 1:03:54browse to let you go through any
- 1:03:56recents, favorites or even shared with
- 1:03:58you. Then is probably the most important
- 1:04:00is workspaces. And workspaces is what I
- 1:04:03create in order to share with certain
- 1:04:06groups. Now I have my own workspace
- 1:04:08where I maintain all the different
- 1:04:10dashboards that I have and I could give
- 1:04:11people access to this although that's
- 1:04:13not a good idea. Instead what I want to
- 1:04:15do is I can create other workspaces by
- 1:04:18creating this new workspace and I can
- 1:04:20store in this one here called data job
- 1:04:22postings different dashboards within it
- 1:04:24that I want people to have access to. So
- 1:04:27this was the dashboard we built which
- 1:04:29we're going to get to the end of this of
- 1:04:30actually uploading to the PowerBI
- 1:04:32service. But I can have other reports as
- 1:04:34well like this one here that connects to
- 1:04:36my BigQuery database. And remember we
- 1:04:38had 3.6 million jobs in that database.
- 1:04:41Anyway, this dashboard on the service
- 1:04:44has a direct query access to that
- 1:04:47database in this dashboard. Pretty neat.
- 1:04:50Anyway, I have it all centralized in
- 1:04:52that one workspace that I can give
- 1:04:54certain people access to. All I have to
- 1:04:56do is go into that workspace, go into
- 1:04:58manage access, and add or remove any
- 1:05:01type of people or groups into here. One
- 1:05:03note with this, those that have a free
- 1:05:06license, which we're about to get into
- 1:05:07license types, but those that have a
- 1:05:08free license, you won't have the ability
- 1:05:11to create new workspaces. You'll only
- 1:05:13have my workspace. But that's actually a
- 1:05:15great segue.
- 1:05:19So, what are your options to get access
- 1:05:21to the PowerBI service? Well, they have
- 1:05:24a few different options that you'll be
- 1:05:25able to choose from. The first is free.
- 1:05:27And like I mentioned, you're going to
- 1:05:28need either a work or school email
- 1:05:31account. You won't be able to use any
- 1:05:33personal email accounts. They won't let
- 1:05:34you use this to create a free account.
- 1:05:36Additionally, with the free account, not
- 1:05:38only can you not create workspaces, but
- 1:05:40you also won't be able to share any of
- 1:05:42your work. So, that share to web not
- 1:05:44going to be able to do. Basically,
- 1:05:46you're really limited. Next up is the
- 1:05:47pro license, and I feel it's the perfect
- 1:05:50license. If you want to get anything, I
- 1:05:51would get that one. And that allows you
- 1:05:54to share and collaborate with others.
- 1:05:57Not only can you build reports, but you
- 1:05:59can also share them to the web like I
- 1:06:01demonstrated earlier. Now, the other two
- 1:06:03of preamp per user and then also
- 1:06:05embedded. Those are just more advanced
- 1:06:08PowerBI that we're not even going to get
- 1:06:10into that more has to deal with when
- 1:06:12you're dealing with even larger data
- 1:06:14sets or more frequent data refreshes.
- 1:06:17But based on what we're just trying to
- 1:06:18accomplish with this course, that's way
- 1:06:20out of the scope of what you'd need.
- 1:06:21However, this would be something that
- 1:06:23you may need to consider in the real
- 1:06:25world when you get to a company and
- 1:06:26you're working with some really large
- 1:06:28data sets.
- 1:06:32All right, the remainder of this lesson
- 1:06:33is going to be going through actually
- 1:06:35purchasing the PowerBI Pro license,
- 1:06:38setting it up, and then uploading a
- 1:06:40dashboard so that way we can share with
- 1:06:41this. As a reminder, this portion is
- 1:06:45completely optional. In no way do you
- 1:06:47need to purchase a license to complete
- 1:06:49this course. Mainly, this is just doing
- 1:06:51this for a learning experience in order
- 1:06:53for you to see what is actually done and
- 1:06:55what you can accomplish with the PowerBI
- 1:06:57service. For the remainder of the
- 1:06:59course, you will have the option to
- 1:07:02share your dashboard to the PowerBI
- 1:07:04service, but I'll also be providing
- 1:07:06other methods of how you can share the
- 1:07:08file instead in order to be able to
- 1:07:10share your work. All right, so let's let
- 1:07:12me get into it of purchasing this Pro
- 1:07:14license. First thing you got to do is
- 1:07:16verify you're not a robot. And then
- 1:07:17you'll need to go through and after you
- 1:07:19put in your email, can be a personal
- 1:07:21email. You need to put in all your
- 1:07:23different personal information. After
- 1:07:25this, they're going to be setting you up
- 1:07:27with a custom domain name because you're
- 1:07:29not going to use your personal email
- 1:07:31account to sign in. You're actually
- 1:07:32going to be using something they
- 1:07:34assigned to you to sign in further. So,
- 1:07:37don't lose this email that they give
- 1:07:38you. And also, don't forget the password
- 1:07:41that they that you make for this. After
- 1:07:43you've gone through and applied all your
- 1:07:45payment information to set up those
- 1:07:46recurring monthly payments, they do want
- 1:07:48you to set up a security measure of
- 1:07:51using the authenticator app from
- 1:07:52Microsoft to verify that it's actually
- 1:07:55you. Anyway, this will require you to
- 1:07:56log onto your phone and actually use
- 1:07:58that to verify you are who you are.
- 1:08:00Anytime you log into PowerBI, you're
- 1:08:02going to have to do this. Once that's
- 1:08:03done, you'll have a confirmation method
- 1:08:05giving you that email in case you didn't
- 1:08:07write down earlier and you can jump
- 1:08:09right in of start using PowerBI Pro. And
- 1:08:12so let's jump right in. And it's going
- 1:08:14to take us immediately to the admin
- 1:08:16center within Microsoft 365. If we want
- 1:08:19to get to PowerBI, we go to the corners
- 1:08:21up to the left and we click PowerBI. And
- 1:08:23then bam, we're here inside the service
- 1:08:25itself. All right. So we've already done
- 1:08:27a quick tour of this. Now what we need
- 1:08:29to do is we need to link our PowerBI,
- 1:08:32our desktop app to this service.
- 1:08:38So now I'm here back inside of our
- 1:08:39desktop app. We want to actually go
- 1:08:42through and sign in. So up in that top
- 1:08:44top right hand corner, I'm going to
- 1:08:46click sign in. Going to put in the email
- 1:08:48account that they gave me for my PowerBI
- 1:08:51Pro account. And then after entering my
- 1:08:53credentials of my login and also my
- 1:08:56password, I need to then go to the
- 1:08:58authenticator app and inside of here
- 1:09:01insert the number that's on the screen
- 1:09:03in order to access. I'm going to select
- 1:09:05yes that I wanted to have access to all
- 1:09:07apps. But now we want to get this
- 1:09:10PowerBI dashboard into the service.
- 1:09:14Specifically here I am inside the
- 1:09:16service and underneath workspaces we can
- 1:09:20either upload it into my workspace or I
- 1:09:23have this one called data job postings.
- 1:09:25If you don't you can create a workspace
- 1:09:26if you did create that pro license by
- 1:09:28just clicking new workspace and then
- 1:09:30from there all you got to really do is
- 1:09:32put a name for that. You can even assign
- 1:09:34an image. Click apply and you got this
- 1:09:36new workspace. Anyway, we're going to be
- 1:09:38using my data jobs postings one. So,
- 1:09:40feel free to copy that name if you want.
- 1:09:42Right now, I only have one dashboard
- 1:09:44inside of here. And just a quick note
- 1:09:46with this right here, it says, hey, this
- 1:09:49is the report. So, this is the actual
- 1:09:51dashboard itself. When I navigate to it,
- 1:09:53I can actually see it here. And then the
- 1:09:56other one is the semantic model.
- 1:09:59Basically, it's the data set, all the
- 1:10:00data and all the different information,
- 1:10:02the metadata behind it. So, anytime you
- 1:10:05upload anything, you're going to see
- 1:10:06two. You're going to see the report and
- 1:10:08the semantic model. Anyway, back in the
- 1:10:10PowerBI app, I can come up here now. I
- 1:10:12know I want it up there. I'm logged in.
- 1:10:14I'm going to click publish and it's
- 1:10:16going to say, hey, select a destination.
- 1:10:18I can either go to my workspace or that
- 1:10:20one I created of data jobs postings. I'm
- 1:10:23going to do that. Select select. And now
- 1:10:25it's going to go through actually
- 1:10:27uploading it to the service. After less
- 1:10:29than a minute, you'll get the success
- 1:10:30message and you then from there can open
- 1:10:33it inside of PowerBI. Let's open another
- 1:10:35tab and then bam, here is the dashboard
- 1:10:38inside of here. And looks like it's
- 1:10:40working just fine. Filtering all the
- 1:10:42different data has everything in it.
- 1:10:44Good to go.
- 1:10:47Now, what happens now if you want to go
- 1:10:49ahead and go into file embed reports and
- 1:10:52you actually want to publish this bad
- 1:10:54boy to the web. Well, for you, if you've
- 1:10:56just logged in, you're not going to be
- 1:10:58able to do it unless you enable some
- 1:11:00extra features. Don't worry, they don't
- 1:11:02cost any money. We just have to actually
- 1:11:04go through and actually set it up.
- 1:11:05Anyway, we need to go into settings up
- 1:11:08in the top right hand corner and then
- 1:11:10scroll down until we see something
- 1:11:12called the admin portal. That's where we
- 1:11:14want to go to. This has all the
- 1:11:16different settings and control at a high
- 1:11:18level for the service. The first thing
- 1:11:20we're going to come over to this filter
- 1:11:22on the right hand side and we're going
- 1:11:24to search for publish to web. I'm going
- 1:11:26to go ahead and click this arrow to open
- 1:11:27it up. Right now, mine's enabled. Most
- 1:11:29likely yours is not enabled. I think
- 1:11:32it's disabled actually. Let's see. Yeah,
- 1:11:33it's disabled. You want to enable it.
- 1:11:36So, make sure that's enabled so you can
- 1:11:37actually publish to the web. You should
- 1:11:39allow it for all users and it should be
- 1:11:40for the entire organization. After you
- 1:11:42do this, click apply. Now, there's one
- 1:11:45other setting you have to do as well.
- 1:11:48This is under advanced networking
- 1:11:50specifically under tenant level private
- 1:11:53link. This needs to be disabled. So, if
- 1:11:58it's not if you're in your case, it's
- 1:12:00probably enabled. you need to disable it
- 1:12:02anyway. Whenever you disable it, click
- 1:12:03apply. Once again, with like the last
- 1:12:06one, these things take up to 15 minutes
- 1:12:09to complete. So, you're not going to be
- 1:12:11able to publish your report just yet.
- 1:12:14You can try. It's probably not going to
- 1:12:15work. Didn't work for me. It took about
- 1:12:1715 minutes. Anyway, let's assume 15
- 1:12:19minutes passed. Okay. So, here I'm on
- 1:12:21the data jobs dashboard. Going to go to
- 1:12:22file, embed report, and publish to web.
- 1:12:26It's going to ask me or ask it's going
- 1:12:28to basically say, "Hey, this link's
- 1:12:29going to include on a public website."
- 1:12:31That's okay. Yep. I'm going to click
- 1:12:32continue. And it's going to make sure
- 1:12:34that hey, make sure you're not
- 1:12:35publishing any confidential proprietary
- 1:12:37pro proprietary information. So if you
- 1:12:40have any confidential data, this is not
- 1:12:42confidential. You can share it, but
- 1:12:44especially if you're dealing with work
- 1:12:46type of data, you don't want to be doing
- 1:12:48this. This is specifically for open free
- 1:12:50data. And now with this, I have two
- 1:12:52different links like we talked about
- 1:12:53before. I can just copy that link and
- 1:12:56then even going into this browser right
- 1:12:58here, I can see that whenever I enter
- 1:13:00the link in, it's live on the web, free
- 1:13:02for anybody to access. So that's an
- 1:13:05overview of PowerBI service and how you
- 1:13:07can go about sharing something like this
- 1:13:08dashboard. We do now have a quiz for the
- 1:13:10practice problems to go through and test
- 1:13:12your knowledge and make sure you
- 1:13:13understand how to use the PowerBI
- 1:13:15service. Now, in the next chapter, we're
- 1:13:17going to be jumping into building
- 1:13:20visualizations. We're going to be
- 1:13:21tackling all the different ones. super
- 1:13:23excited about that. With that, I'll see
- 1:13:25you there.
- 1:13:30Welcome to chapter 2. We're going to be
- 1:13:31covering visualizations. We're going to
- 1:13:34be walking through every single type
- 1:13:35that you're actually making here and
- 1:13:37which ones are actually useful. Now, in
- 1:13:40this lesson here, we're going over
- 1:13:41column and bar charts. But before that,
- 1:13:44we really need to understand what we're
- 1:13:45going to be covering for this entire
- 1:13:47chapter. So, let's jump into my
- 1:13:49computer.
- 1:13:52So let's dive into the PowerBI report
- 1:13:54that we're going to be using for this
- 1:13:55chapter here in the second folder for
- 1:13:58visualizations. We just have a single
- 1:14:00file for this. When you open this up,
- 1:14:02you should be navigated first to this
- 1:14:04homepage. And these are actually
- 1:14:06different buttons that you can use to
- 1:14:08navigate to the different buttons. You
- 1:14:10just have to press control and then
- 1:14:12click and then you can navigate to
- 1:14:14anything. And then if I want to go back
- 1:14:15to that home menu, I have this
- 1:14:17convenient home menu icon up here. Once
- 1:14:19again, I have to press control and then
- 1:14:20click and it navigates me back. We'll be
- 1:14:22covering buttons in the last lesson of
- 1:14:24the chapter, but let's look what we're
- 1:14:26going to cover now. In this lesson,
- 1:14:27we're going to be covering column and
- 1:14:29bar charts. We're going to go over four
- 1:14:31different examples and distinguish
- 1:14:33between what is a bar chart and what is
- 1:14:35a column chart. Second lesson is going
- 1:14:38to use time series data in order to make
- 1:14:40line charts and also area charts. The
- 1:14:43third lesson is going to go into common
- 1:14:45charts that I find myself using beyond
- 1:14:47those other ones that we just covered in
- 1:14:49lesson one and two, specifically pie
- 1:14:51charts, donut charts, scatter plots, and
- 1:14:53tree maps. Lesson four, we'll get into
- 1:14:55maps. And PowerBI has three different
- 1:14:57options that you can choose through for
- 1:14:58this. And then lesson five, we'll get
- 1:15:00into some uncommon charts. Mainly, I'm
- 1:15:02just going to show these in order for
- 1:15:04you to understand what charts you
- 1:15:06probably shouldn't be using most of the
- 1:15:07time, but have familiarity with it.
- 1:15:09Lesson six, we'll get into building not
- 1:15:11only tables, but also matrices. Matrices
- 1:15:15allow us to actually dive into the data
- 1:15:16a little bit more uh in depth. Anyway,
- 1:15:19we'll also be covering with this
- 1:15:20conditional formatting. So, we'll just
- 1:15:22do things like do these color icons or
- 1:15:23color bars. Lesson seven will be on
- 1:15:26cards because everybody loves a good
- 1:15:27card that tells a good data point. And
- 1:15:29then lesson eight will be on slicers
- 1:15:31because we don't always want to use just
- 1:15:32filters alone to actually filter down
- 1:15:34our data. And then like I mentioned,
- 1:15:36lesson 9 will be buttons where we'll
- 1:15:38actually build this out here and
- 1:15:41understanding how buttons work and also
- 1:15:43bookmarks. Now, this report also
- 1:15:45includes the two pages for our
- 1:15:46dashboard. This is our first official
- 1:15:49project dashboard that we're going to be
- 1:15:50building and it's on our data set and it
- 1:15:53allows us to actually dive into if I
- 1:15:55want to dive into data engineers can
- 1:15:57filter down for it and then it provides
- 1:15:59a drill through. If I click this to get
- 1:16:02more in-depth data points for this
- 1:16:04particular topic of data engineer want
- 1:16:06to navigate back I just click this back
- 1:16:08arrow right here holding control
- 1:16:10navigates me back to the dashboard.
- 1:16:11We'll get to the dashboard when we get
- 1:16:13to the project session, but I wanted to
- 1:16:14warn you that's in this report because
- 1:16:16we're going to be using a lot of the
- 1:16:17visualizations that we build throughout
- 1:16:19this chapter in this dashboard.
- 1:16:21Basically, we're not going to be wasting
- 1:16:22any of our work. Now, one quick note on
- 1:16:24the purpose of this chapter. This is not
- 1:16:27meant for us to go through and you to be
- 1:16:29a basic technical nerd about how to
- 1:16:32build each of these visuals, although we
- 1:16:34will cover that. I feel the more
- 1:16:36important part is understanding when you
- 1:16:38should apply each of these visuals given
- 1:16:42a certain problem you need to tackle. So
- 1:16:44yes, pay attention how they're built,
- 1:16:45but more importantly, pay attention to
- 1:16:48when they are actually used.
- 1:16:53So let's get into our first of four
- 1:16:55visualizations we're going to be
- 1:16:56building for this. And in this one, we
- 1:16:58need to understand what the difference
- 1:16:59is between a column and bar chart. For
- 1:17:02this, we're going to be asking this
- 1:17:03question. What is the highest paying job
- 1:17:06in data? And for this we only want to
- 1:17:09look at remember our data set contains
- 1:17:1110 distinct job titles. We just want to
- 1:17:13limit it to these uh six of basically
- 1:17:16data analysts, scientists, engineers,
- 1:17:17and also their senior roles. So for you,
- 1:17:20let's start out in a brand new PowerBI
- 1:17:22file. I'll select blank report. Peeking
- 1:17:25in the data pane. There's no data in
- 1:17:26here. So let's import in our data set.
- 1:17:29Remember, it's a text CSV file. It's
- 1:17:32inside of our data folder and it's that
- 1:17:33job postings flat CSV. Everything's
- 1:17:36looking good with this navigator pop-up
- 1:17:38that pops up and we'll load it in. Data
- 1:17:41set completed, loaded in. Everything's
- 1:17:43looking well underneath this data pane.
- 1:17:45But like always, I want to go into table
- 1:17:47view and just go through and make sure
- 1:17:50that everything is formatted correctly.
- 1:17:52Specifically, if you remember from last
- 1:17:54time, we had that salary year average.
- 1:17:55If I sort it to sending, it's only right
- 1:17:58now a whole number. I'm going to change
- 1:17:59this to a currency. And for the decimal
- 1:18:01places, I'm going to change this to
- 1:18:03zero. We're also going to update the
- 1:18:04salary hour average to a currency as
- 1:18:07well. And for this, we'll give it two
- 1:18:08decimal places. As always with every
- 1:18:10file, we need to make sure that we're
- 1:18:12saving it often. So, I'm just going to
- 1:18:14save it here on my desktop. So, let's
- 1:18:16actually get into building this
- 1:18:18visualization on our canvas. I'm going
- 1:18:19to go ahead and select stacked bar chart
- 1:18:22to add it in. I'm going to resize it to
- 1:18:23take up the top quarter. For this, we
- 1:18:26want the job titles along the Y ais and
- 1:18:28the count of them along along the X-
- 1:18:31axis. We can use both these fields for
- 1:18:33this. So, I'm going to drag job titles
- 1:18:34short into both of these. From here, I'm
- 1:18:36going to go into focus mode so we can
- 1:18:38drill into it closer. All right. Right.
- 1:18:40So, this is a bar chart. Bar charts go
- 1:18:42horizontally. Let's compare this to a
- 1:18:45column chart. We'll use a the same
- 1:18:47format. Specifically, we'll use that
- 1:18:49stacked column chart. And the column
- 1:18:52charts go up and down. The way I
- 1:18:54remember this is pretty easy. Columns
- 1:18:56like that of a building go up and down.
- 1:19:00And the column chart does the same
- 1:19:01thing, but we're building a bar chart
- 1:19:03for this. So, we're going to change this
- 1:19:04back to a stacked bar chart. And
- 1:19:06navigating back to our what our final
- 1:19:08visualization look like. I realize I
- 1:19:10made a grave mistake. I didn't read this
- 1:19:11fully. We're trying to plot or make a
- 1:19:14visualization of what is the highest
- 1:19:15paying job in data. We don't need to be
- 1:19:17doing a count of jobs. We need to be
- 1:19:19doing the median salary of jobs. So
- 1:19:23let's actually update this visual. I'm
- 1:19:24going to take that salary year average
- 1:19:27column and I'm going to drag it into the
- 1:19:29xaxis. Right now we have a sum of the
- 1:19:32salary year average. We want to actually
- 1:19:33change that to a median. And right now
- 1:19:36it's a right stack bar chart. So that we
- 1:19:39have multiple different values going
- 1:19:40here. We don't want that count of job
- 1:19:42tiles short. So I'm going to go ahead
- 1:19:43and click that to exit out. All right.
- 1:19:45Navigating back to the canvas area
- 1:19:48itself. I want to put a title first
- 1:19:50because that influences my decision on
- 1:19:52how I'm going to format the rest of the
- 1:19:54chart. If we want to format the visuals
- 1:19:56title, remember we can't we have to be
- 1:19:58selected on the visual. If I were to
- 1:19:59click this, it's not going to give us
- 1:20:01what we want. So, actually select the
- 1:20:02visual, select format your visual. And
- 1:20:05then underneath the general selection,
- 1:20:08that's where the title is. We're going
- 1:20:10to change this to what is the highest
- 1:20:13paying job in data. I'm going to give
- 1:20:15this a size 20 point font. and also
- 1:20:17we're going to center it. I like to
- 1:20:19typically ask a question with my charts
- 1:20:22to guide the user or the end user on
- 1:20:25what they should be looking for in the
- 1:20:26visual. Going back into focus mode,
- 1:20:29understanding what this title is, we can
- 1:20:31see that this is clearly job titles. So,
- 1:20:33I don't need a y-axis label. So, under
- 1:20:35format your visual under the visual
- 1:20:38section, I can go into y-axis. And we
- 1:20:40don't want to toggle on or off the
- 1:20:41values, but instead we want to toggle
- 1:20:44off the uh the title itself. Next, let's
- 1:20:46format the Xaxis label. We could do that
- 1:20:49here underneath the title section. You
- 1:20:52can update it right here. It's auto
- 1:20:54right now. I don't recommend doing it
- 1:20:56here. Instead, we're going to double
- 1:20:58click the field well. And then we'll
- 1:21:00replace this value here with the value
- 1:21:03of median yearly salary. And then
- 1:21:05typically, I like to provide what are
- 1:21:07the units of currency. In this case,
- 1:21:10it's USD. So, not bad. If I scroll over
- 1:21:13this visual, we can see that data
- 1:21:15scientists are getting paid $155,000.
- 1:21:19Notice that that it says job title short
- 1:21:21in front of that. Because of that, I'm
- 1:21:23going to also update this y-axis right
- 1:21:25here to say job title. So now whenever I
- 1:21:28scroll over the tool tip, it looks a lot
- 1:21:30cleaner. So let's get into filtering
- 1:21:32these values down. Remember, we want
- 1:21:34data analyst, data scientist, data
- 1:21:36engineers, and also their senior roles.
- 1:21:38The common thing about them all is they
- 1:21:41contain the word data. So, opening up
- 1:21:43the filters pane and underneath filters
- 1:21:46on this visual, we want to filter the
- 1:21:49job title. Now, I could go through and
- 1:21:52select those six, but I'm lazy, so I'm
- 1:21:55actually going to go into advanced
- 1:21:57filtering. And it says, hey, we can show
- 1:21:59the items when the value contains, in
- 1:22:03our case, we want it to contain the word
- 1:22:04data. Apply the filter. Bam, we get
- 1:22:08those six roles. All right, so now we
- 1:22:10can actually sit back and analyze it. We
- 1:22:12see that senior roles are typically paid
- 1:22:13higher except in the case of senior data
- 1:22:16analyst. Little questionable there. I
- 1:22:18don't know what's going on, but overall
- 1:22:21all these median salaries are where I
- 1:22:24expect. Also, quick note, we're going to
- 1:22:26be doing or focusing on median values
- 1:22:29throughout this entire course over
- 1:22:31something like average. If I go to that
- 1:22:34table view and sort so uh salary year
- 1:22:36average in descending order, you can see
- 1:22:38we have a lot of high values here. In
- 1:22:42this case, we have one job that has
- 1:22:44$920,000
- 1:22:46as a salary. If we were to use average,
- 1:22:49it's going to distort this value that
- 1:22:51we're going to seeing. It's going to
- 1:22:52make it much higher than what we'd
- 1:22:54expect. That's why we're using median
- 1:22:56because it more or less normalizes what
- 1:22:58we should see for the salary. And as
- 1:23:00proof of this, I can just show you
- 1:23:02senior data scientists are at 155,000
- 1:23:05for their median salary. If I were to
- 1:23:07change this to average, they go up to
- 1:23:10155,900.
- 1:23:12And I don't know if you noticed, but all
- 1:23:14the other ones also increased. So, it's
- 1:23:16really unrealistic for us to display
- 1:23:19these average values. That's why we're
- 1:23:20going to do median because that's more
- 1:23:22realistic of what you would expect to
- 1:23:24see if you were applying for these jobs.
- 1:23:28Next question to get into relates on
- 1:23:31these lines and that is what is the
- 1:23:33highest paying job globally. So similar
- 1:23:36before we're going to be looking at
- 1:23:38those same six job titles but for this
- 1:23:42we're going to be looking at the top
- 1:23:44four countries or the four countries
- 1:23:46that have the most amount of jobs. So
- 1:23:48back in our canvas I don't like starting
- 1:23:50from scratch if I don't need to. So I'm
- 1:23:52actually going to copy this visual by
- 1:23:54pressing Ctrl + C. Make sure that it's
- 1:23:56actually selected and then press Ctrl +V
- 1:23:58to copy it down and paste it. I'm going
- 1:24:00paste it underneath. I'm going to update
- 1:24:02the title to what is the highest paying
- 1:24:04job globally so we don't have a repeat
- 1:24:06of last time me doing the aggregation in
- 1:24:08the wrong column. So with this, let's
- 1:24:10change this into the correct chart type
- 1:24:12that we want to use. We want to use this
- 1:24:15clustered column chart. And if you
- 1:24:17notice, it went through and actually
- 1:24:20swapped that x-axis and y-axis to make
- 1:24:22sure the values right. Unfortunately, it
- 1:24:24didn't keep our label. So, I'm going to
- 1:24:26go ahead and update that. All right. So,
- 1:24:27remember we want this with the country
- 1:24:30along the x-axis and basically have the
- 1:24:34different job titles aggregated in
- 1:24:36between it. So, navigating to our visual
- 1:24:38going into focus mode. I'm going to take
- 1:24:41job country and let's just drag it into
- 1:24:43the x-axis. Now, if you go through this,
- 1:24:46we can actually see that it combines
- 1:24:49every job title and also job country.
- 1:24:52So, in this case, this is in Armenia.
- 1:24:54This is for data analysts and this is
- 1:24:56their median salary. This is basically
- 1:24:59highly unreadable and highly unusable.
- 1:25:02What we actually want to do is we want
- 1:25:04the job we want to keep job country on
- 1:25:06that x-axis, but we're going to take the
- 1:25:07job title and we're going to drag it on
- 1:25:10down. Specifically, I want to take this
- 1:25:11down into legend. And bam, there's what
- 1:25:14we want. Although also highly unreadable
- 1:25:17because we have close almost 200
- 1:25:19countries. There's too many countries on
- 1:25:21here to actually use. So for this
- 1:25:24visual, we need to apply a filter on it
- 1:25:27based on so filter on this visual in the
- 1:25:29job country column. Now we could filter
- 1:25:32I could scroll through this and see the
- 1:25:34different counts and select the ones
- 1:25:36that I want. But you know I'm lazy. I
- 1:25:38like to automate it. So we're going to
- 1:25:40instead use the filter type and we're
- 1:25:42going to change this now to use top N.
- 1:25:45Specifically want the top four
- 1:25:47countries. But what do we want the top
- 1:25:49four countries based on? Well, we want
- 1:25:51them based on the count of those
- 1:25:54countries. So, I'll change this to count
- 1:25:57from first and then I'll click apply
- 1:25:59filter. And there we have it. United
- 1:26:01Kingdom, United States, France, and also
- 1:26:04India in there. Now, there's a lot of
- 1:26:06different data points going on in here.
- 1:26:09And I'm noticing right now too with it
- 1:26:11that this x-axis I need to update it to
- 1:26:14just country so that way it's more
- 1:26:15readable. But there's a lot of different
- 1:26:17data points in here to actually view. If
- 1:26:19for some reason you wanted to get those
- 1:26:21data points or maybe somebody else did,
- 1:26:23you click the three dots up the top
- 1:26:25right hand corner and then you could go
- 1:26:27here to show as table and then you have
- 1:26:31all these different values here and you
- 1:26:32can actually see them more visually here
- 1:26:34if you wanted to. Also, you could just
- 1:26:36export the data as well and it's going
- 1:26:38to exported it out. All right, so let's
- 1:26:39go back to our report. I want to clean
- 1:26:41up one thing real quick. If we look at
- 1:26:43that filters tab, remember we have job
- 1:26:46titles contains data right here on this
- 1:26:47visual and also right here on this
- 1:26:50visual. I actually want to apply it to
- 1:26:52the entire page. So what I'm going to do
- 1:26:56is I'm going to just take this and I'm
- 1:26:58going to drag it into filters on this
- 1:27:00page. And as you notice, it's not
- 1:27:02actually working. So instead, what I'm
- 1:27:04going to do is I'm going to drag job
- 1:27:05tile short onto here. Do that advanced
- 1:27:07filtering for those jobs that contain
- 1:27:09data. and then click apply filter. Now
- 1:27:12for each one of these uh visuals, we
- 1:27:15don't need to maintain it on here long.
- 1:27:16It's just sort of redundant. I'll remove
- 1:27:18it on this visual. Selecting this
- 1:27:20visual, I'll also remove it by se
- 1:27:22selecting clear filter. So now it's
- 1:27:24removed on both of these, but it's
- 1:27:27applied when I click the page. It's
- 1:27:28applied on the page. Also, sometimes
- 1:27:31whenever you just click onto here, it's
- 1:27:32going to generate these other visuals.
- 1:27:34It's sort of annoying. Anytime you need
- 1:27:36to remove them, you just click those
- 1:27:37ellipses and click remove. All right.
- 1:27:40So, this, as a reminder, is a clustered
- 1:27:43column or if I wanted to, I could change
- 1:27:46it to a clustered bar chart.
- 1:27:50All right. Next up is a stacked column,
- 1:27:52or if you will, stacked bar chart. We're
- 1:27:54going to make it into a stack column
- 1:27:56chart. With this visualization, we want
- 1:27:58to see not only what are the counts of
- 1:28:01the different job titles, but we want to
- 1:28:04see the breakdown of whether they
- 1:28:06mention a degree requirement in the job
- 1:28:09posting. If we go into our table view,
- 1:28:12we have this column here on job no
- 1:28:14degree mention. It's a true or false
- 1:28:17value. If it's true, there's no mention
- 1:28:21of a degree requirement in the job
- 1:28:23posting. Doesn't mean that doesn't
- 1:28:24require a degree. it just means that
- 1:28:26they don't mention it. So, in the case
- 1:28:28of it being false, there is a degree
- 1:28:31requirement mentioned in the job
- 1:28:33posting. Anyway, let's actually
- 1:28:35visualize this for those top six jobs. I
- 1:28:38don't like starting from scratch, so I'm
- 1:28:39going to copy this first visual, press
- 1:28:41commandV, drag it over to the top right
- 1:28:43hand corner. Personally, I like whenever
- 1:28:46we have these labels here uh going into
- 1:28:48f mode written in this manner and so
- 1:28:50keeping it as a bar chart. But like I
- 1:28:52said, we're going to be using a stacked
- 1:28:54column chart for this instead. Right
- 1:28:55now, we're doing the median salary, but
- 1:28:57we need a count of the job titles. So,
- 1:29:01I'll drag the job title short into that
- 1:29:03y-axis. Click that median off here. Now,
- 1:29:05we have the count, but we want to see
- 1:29:07the breakdown of job no degree mention.
- 1:29:10So what we can do with this is throw
- 1:29:13this into the legend. So taking job no
- 1:29:16degree mention put it there. And now
- 1:29:19these values are stacked. We're going to
- 1:29:21do some clean up of the columns.
- 1:29:23Changing y-axis to job title. Changing
- 1:29:26the legend to no degree mentioned. And
- 1:29:28then lastly changing that title. So
- 1:29:31under format your visual under general
- 1:29:33under title we change it to what are the
- 1:29:35top jobs with no degree mentioned. And
- 1:29:38looking at it, data engineers by far
- 1:29:41have some of the the highest amounts of
- 1:29:44jobs that have no degree mentioned in
- 1:29:46the job posting, but data analysts
- 1:29:48aren't far behind.
- 1:29:52Last visual to make is a 100% stacked
- 1:29:56column or bar chart. In this case, we're
- 1:29:58looking at obviously a bar chart. Now,
- 1:30:00this is great anytime you want to
- 1:30:02visualize proportions like in our last
- 1:30:04case. Yeah, it's great that we can see
- 1:30:07what is the overall quantity values, but
- 1:30:10say we are stuck in something like
- 1:30:13senior data engineers, senior data
- 1:30:14scientists, we may want to better
- 1:30:16understand what are the proportions of
- 1:30:18jobs that this is likely to happen. In
- 1:30:20that case, we could build a
- 1:30:21visualization like this that shows what
- 1:30:23portions of jobs mention a degree. In
- 1:30:26this case, we could use something like a
- 1:30:28100% stacked bar column chart to
- 1:30:31visualize this proportion to see what
- 1:30:33portion of JSP should agree. So, let's
- 1:30:35build this bad boy. So, a lot of the
- 1:30:37stuff is going to be using this visual
- 1:30:38right here. I'm going to go ahead and
- 1:30:40copy it and paste it. And then come up
- 1:30:42here and change this into a 100% stacked
- 1:30:45bar chart. Moving this into focus mode.
- 1:30:48We pretty much have this completely
- 1:30:49built. We just got to update a few
- 1:30:51titles and update it to what portion of
- 1:30:54top jobs have no degree mentioned. And
- 1:30:57the only other thing to clean up on this
- 1:30:59is the actual x-axis title. I'll do that
- 1:31:02from here. And we'll change this to job
- 1:31:05count. So with this, although we did see
- 1:31:08from last time that data analysts and
- 1:31:10data engineers had some of the highest
- 1:31:13quantities, when we actually look at the
- 1:31:15100% stack view, we can see that things
- 1:31:17like senior data engineers and data
- 1:31:20engineers are both pretty much it's like
- 1:31:22half the postings don't have a
- 1:31:24requirement or don't mention a
- 1:31:26requirement of a degree. And data
- 1:31:28analysts correlate as well. They're
- 1:31:30around 40%. and then sat uh data
- 1:31:33scientists apparently pretty stingy.
- 1:31:35Seven almost 7% on both have a no
- 1:31:39mention of a degree whereas like 93
- 1:31:41require some sort of degree. So if you
- 1:31:43don't have a degree, if you're not
- 1:31:44focused on data analyst jobs, you should
- 1:31:46also be focusing on data engineer jobs.
- 1:31:48All right, so boom, that is the
- 1:31:50different column and bar charts. They're
- 1:31:52all along the top line here. The last
- 1:31:53thing I'm going to do on this is just
- 1:31:55update this page title to be called
- 1:31:57column and bar and then make sure you
- 1:31:58save it. We now have some practice
- 1:32:00problems for you to go through and get
- 1:32:02more familiar with when you should be
- 1:32:04using bar and also column charts and
- 1:32:06these different aggregation or
- 1:32:08variations of them each. In the next
- 1:32:10lesson, we're going to be going into
- 1:32:12line and area charts. With that, I'll
- 1:32:14see you there.
- 1:32:19Welcome to this lesson on line and area
- 1:32:21charts. And after things like bar and
- 1:32:24column charts, which we covered in the
- 1:32:25previous lesson, this is the second most
- 1:32:29common type of charts that I find myself
- 1:32:32using. Let's jump into the final report
- 1:32:34to see what we're going to be building
- 1:32:36in this lesson. First, we're going to
- 1:32:38start simple, building a simple line
- 1:32:40chart, understanding what is the trend
- 1:32:43of jobs in 2024. Remember, this data set
- 1:32:46that we're working with only includes
- 1:32:49jobs from 2024. Next, we'll transition
- 1:32:52this over into an area chart, which if
- 1:32:55you see, it has a similar trend that our
- 1:32:56line chart did, but in this case, we're
- 1:32:58able to now see what are the different
- 1:33:01jobs that compromise or compose those
- 1:33:04different job counts. And anytime you
- 1:33:06have any type of stacked area chart, you
- 1:33:08have probably some sort of 100% stacked
- 1:33:11area chart. Finally, we'll wrap it up
- 1:33:13with this visualization looking how we
- 1:33:15can combine column charts with also line
- 1:33:18charts. In this case, we're going to be
- 1:33:20comparing what is the yearly median
- 1:33:22salary compared to hourly median salary
- 1:33:25of those top 10 jobs.
- 1:33:29So, let's get into building this bad boy
- 1:33:31of understanding what is the trend of
- 1:33:33jobs in 2024. In the PowerB report we've
- 1:33:37been working on, I'm going to create a
- 1:33:38new page and I'm going to change the
- 1:33:40title of this to line and area. Clicking
- 1:33:42inside the canvas, I'm going to insert
- 1:33:44in a line chart. We'll drag this into
- 1:33:47the top quadrant. So along the bottom
- 1:33:49along the x-axis, we want to use the job
- 1:33:52posted date column. We're going to dive
- 1:33:54into this a little bit more. Right now,
- 1:33:56nothing's appearing. We need to put
- 1:33:58something into the yaxis. Specifically,
- 1:34:01want the counts of jobs. Remember, we're
- 1:34:02going to just use that job title short
- 1:34:04column because we don't have necessarily
- 1:34:06a job ID column. This is going to be
- 1:34:08good enough. Okay. We can see from our
- 1:34:10visualization right now that if I hover
- 1:34:13over it, it's only showing one data
- 1:34:15point and it's a dot. It's not even a
- 1:34:17line. because it's only showing this for
- 1:34:19the year of 2024. If I wanted to, I can
- 1:34:22navigate down. We're going to dive in
- 1:34:24more into drill downs right after this,
- 1:34:27but mainly I just show you that we will
- 1:34:29be able to navigate into all the
- 1:34:31different job titles depending on what
- 1:34:33we want. The main thing to understand is
- 1:34:36that for this x-axis, I'm going to
- 1:34:38actually close it out. Remember when we
- 1:34:39drag this job posted date over, it put
- 1:34:43this date hierarchy which is over here
- 1:34:45in the column. So I can actually open
- 1:34:47this up and similarly it has year
- 1:34:49quarter month day. Here I have year
- 1:34:51quarter month day. For the time being
- 1:34:54all we're going to do before we get into
- 1:34:56covering that this drill down
- 1:34:57functionality that's highly complex I
- 1:35:00feel. We're going to just remove these
- 1:35:01other fields of year, quarter, and then
- 1:35:04also day. And we're just going to keep
- 1:35:06the month for right now. I'm going to
- 1:35:08open it up into focus mode. We're going
- 1:35:10to build out this line chart to make
- 1:35:11sure that it has everything right and
- 1:35:13correct in it. And then we're going to
- 1:35:14jump into drill down using those arrows
- 1:35:16to navigate up and down in this. First
- 1:35:18thing I'm going to change is the title.
- 1:35:20Going to format your visual under
- 1:35:21general to title. I only have jobs in
- 1:35:242024. So we'll call this what is trend
- 1:35:26of jobs in 2024. The x-axis label is a
- 1:35:30little redundant because we're already
- 1:35:32saying that hey we're looking at dates.
- 1:35:33So I'm going to turn off the title. Then
- 1:35:35for the yaxis label I'm going to change
- 1:35:37this to instead be something more
- 1:35:40readable of job count. All right. So
- 1:35:42this is looking good. We have everything
- 1:35:44formatted as we wanted. If we remember,
- 1:35:46we had a trend line previously. How do
- 1:35:49we add something like a trend line?
- 1:35:51Well, previously we've looked at this
- 1:35:53build visual. We've looked at this
- 1:35:55format visual. And now we're going to
- 1:35:57look at this analytics underneath the
- 1:35:59visualization pane. Now, this is really
- 1:36:02great anytime you want to add any kind
- 1:36:03of reference lines in here. such as if I
- 1:36:05wanted a minimum line, I could come in
- 1:36:07here under minline, select add line, and
- 1:36:11it adds this line in. Scrolling on down,
- 1:36:14I can even go into and turn on the data
- 1:36:16label. It's positioned on the left hand
- 1:36:18side. It's above it. And what we want to
- 1:36:21show, you could do data value name, or
- 1:36:23in my case, I'd probably like something
- 1:36:24like min. Not too bad. I would dress it
- 1:36:27up a little bit. I don't really like the
- 1:36:29name of min one, so I'm going to edit it
- 1:36:31and change that to minimum job count.
- 1:36:34Now, I could also do the same and add an
- 1:36:36average line as I've done here and also
- 1:36:38change the name. The formatting isn't
- 1:36:40necessarily correct. So, I could change
- 1:36:41the value decimal places to just do zero
- 1:36:44and much more readable. But if we jump
- 1:36:46forward to what we're going to be
- 1:36:48building finally, I had on here a trend
- 1:36:51line yet it's not visible. If we
- 1:36:54actually go through our navigation menu,
- 1:36:56specifically coming back here and
- 1:36:57looking under at further analysis,
- 1:37:00there's nothing for trend line.
- 1:37:02Unfortunately, whenever we just drag one
- 1:37:04of these column values over under date
- 1:37:07hierarchy doesn't and it doesn't no
- 1:37:09longer provides the opportunity to
- 1:37:11provide this trend line. So, we'll add
- 1:37:13it later. For the time being, I'm going
- 1:37:14to remove this average line and then I'm
- 1:37:16also going to remove this min line. I
- 1:37:18don't want to bother.
- 1:37:21So, let's get into understanding drill
- 1:37:24down. I'm going to go ahead and we're
- 1:37:26going to go ahead and add all these
- 1:37:28column values back. Now you notice as I
- 1:37:31added all these back, one these arrows
- 1:37:33appeared and then two if I actually go
- 1:37:36into this add further analysis trend
- 1:37:39line appears now and I can click on I
- 1:37:41can actually get a trend line. I can
- 1:37:43also change the formatting here into a
- 1:37:45light blue color. Anyway, I digress.
- 1:37:47Let's get back into drill down. So of
- 1:37:50all these, the easiest one is drill up.
- 1:37:52Right now I'm down in day. I can just
- 1:37:54click up and navigate all the way back
- 1:37:56up to that year. I'm also going to
- 1:37:58navigate back here. The first down hour
- 1:38:00is to click to turn on drill down mode.
- 1:38:03It's going to be highlighted black. And
- 1:38:05in this case, I can click on points on
- 1:38:07the chart and then drill down into it.
- 1:38:09In that case, I drilled into 2024. And
- 1:38:12now, if I wanted to drill into quarter
- 1:38:142, I can click that. Then, if I want to
- 1:38:16drill into May, I could do that. If I
- 1:38:18wanted to drill further into May 13th,
- 1:38:20can't do that because that's as far as
- 1:38:21low down as we can go. If I wanted to go
- 1:38:23back up, I just click back up. And at
- 1:38:26any point I can turn off this drill mode
- 1:38:28by clicking on the drill mode and then
- 1:38:30just navigating where I want to. The
- 1:38:32next one is to go to the next level in
- 1:38:35the hierarchy. So as expected this we're
- 1:38:37going to click on it. We actually do
- 1:38:39navigate down. In this case we're
- 1:38:41getting quarter 1, quarter 2, quarter 3,
- 1:38:43quarter 4. I'll click down again, get
- 1:38:45the months. But I click down one more
- 1:38:47time and we see that it's a list of
- 1:38:50numbers for month numbers. This double
- 1:38:53down arrow would be used in cases where
- 1:38:56you have multiple years and maybe you
- 1:38:58wanted to look at something like every
- 1:39:02single August or every single September.
- 1:39:05In our case, we only have one year of
- 1:39:072024. And so that's why when we drill
- 1:39:09all the way down to this, we're getting
- 1:39:11these following values, which
- 1:39:14technically this puts together for this
- 1:39:17case, if we were looking at the second,
- 1:39:19this puts together January through
- 1:39:22December, the counts on the 2nd. And
- 1:39:25then something like the 31st is super
- 1:39:28low at like 9,000 because 31st only
- 1:39:31happens one, two, three, like six times
- 1:39:36in a year. Actually, I think it's seven.
- 1:39:38Anyway, I bring that up because
- 1:39:39typically you actually don't want that.
- 1:39:40Anytime I'm navigating to something like
- 1:39:42this, the down arrow that I want to use
- 1:39:45is this expand all down one level in the
- 1:39:48hierarchy. I'm going to go down and
- 1:39:50notice with this one, it's actually has
- 1:39:52the year next to it. If we go back up,
- 1:39:54go down. This one says just quarter 1,
- 1:39:56quarter 2. So, we know that we're
- 1:39:58navigating down in the hierarchy fully.
- 1:40:02So we have each of these which is still
- 1:40:04quarterly and then we get into monthly
- 1:40:06for that year and then we see
- 1:40:09everybody's dailies across the entire
- 1:40:12year. Our data has a lot of seasonality
- 1:40:15to this. Specifically, if you were to
- 1:40:18count each one of these ups and downs,
- 1:40:21you count 52 for 52 weeks in a year.
- 1:40:25These low points are typically on the
- 1:40:27weekend, usually Saturday and Sunday,
- 1:40:30because that's when job postings are not
- 1:40:32getting uploaded because people aren't
- 1:40:34applying to jobs. Then the high points
- 1:40:36are during the week. Anyway, this in my
- 1:40:39opinion is not very readable. So, I'm
- 1:40:41going to drill up one level and we'll
- 1:40:43keep it in this monthly. So, one last
- 1:40:45note on this. I just went through over
- 1:40:47the last couple minutes explaining this
- 1:40:49drill down functionality to you cuz it's
- 1:40:51not that intuitive. Anytime you're
- 1:40:53building any type of report, it's good
- 1:40:56practice to put it and then save it on
- 1:40:59what it is you want them to view because
- 1:41:02they're most likely not going to
- 1:41:04understand how to do the drill down and
- 1:41:06drill up unless you teach them how to
- 1:41:09use it.
- 1:41:12Next visual we're going to get into
- 1:41:13building is a stacked area chart. Now,
- 1:41:16they do have an option for an area
- 1:41:19chart, and if there's only a couple
- 1:41:22values, maybe okay with it. I'm
- 1:41:23typically always going to recommend
- 1:41:24stacked area chart. Anyway, for this, we
- 1:41:26want to see what is the trend of data
- 1:41:28jobs. Basically, we're showing what we
- 1:41:30had previously, but we're breaking it
- 1:41:32down further in the legend by job title.
- 1:41:35All right, so for this, the easiest
- 1:41:36thing is let's just actually copyr C and
- 1:41:39Crl + V and build on this previous line
- 1:41:42chart that we have. And I'm going to
- 1:41:43just convert this into a stacked area
- 1:41:45chart. I'm going to change the title
- 1:41:47real quick to make sure that we're
- 1:41:48staying on task to what is the trend of
- 1:41:51data jobs in 2024. Remember, I like the
- 1:41:53title a little bit bigger than this. I'm
- 1:41:54going put a 20oint font. I'm also going
- 1:41:56to center it. If I select this previous
- 1:41:59visual, it still has this open so I can
- 1:42:01thus update the title as well for it.
- 1:42:03Putting it as 20 point font in the
- 1:42:05center. Anyway, back to this one.
- 1:42:07Entering it into focus mode. Navigating
- 1:42:09back to build visual. Remember, we want
- 1:42:11to break this down by job titles. So,
- 1:42:13I'm going to drag that job title short
- 1:42:15into the legend. And then I'm going to
- 1:42:17change that legend to job title just to
- 1:42:20show that point that we're trying to
- 1:42:21make. Right? This is a stacked area
- 1:42:23chart. And this is going up to the
- 1:42:25values of almost 55,000 here. If we were
- 1:42:28to do just an area chart, it causes it
- 1:42:32to overlap and then the values go down.
- 1:42:34This is just very
- 1:42:37I'm just like I'm having a meltdown
- 1:42:38right now. does not show anything useful
- 1:42:40out of it. Stacked area chart already is
- 1:42:43a little hard to read. That makes it
- 1:42:44even harder to read. Similarly, with
- 1:42:46this one, we can drill down in the
- 1:42:49hierarchy. If I wanted to go to a daily
- 1:42:50basis, oh my gosh, I'm going need to
- 1:42:53take some aspirin for this. Going back
- 1:42:55up, could navigate into the quarters or
- 1:42:57fully for the year. We're going to put
- 1:43:00that back down into monthly. One thing
- 1:43:02that you may want to add to a line chart
- 1:43:05or an area chart that has values that
- 1:43:08you may want to control is this. So
- 1:43:10underneath visuals and format your
- 1:43:12visual, they have this zoom slider. I'm
- 1:43:14going to go ahead and turn it on. It
- 1:43:15automatically enables it for the X and
- 1:43:17Yaxis. In this case, that allows the
- 1:43:20user to go in and zoom in on a
- 1:43:23particular area for what they want to
- 1:43:25do. So if they wanted to drill down into
- 1:43:28the daily portion, they could and then
- 1:43:31look at, hey, what's going on during
- 1:43:33this week right here, I can also enable
- 1:43:35depending on what I want, if the x-axis
- 1:43:37or y-axis, and typically I would just do
- 1:43:39it on the x-axis, especially if it has
- 1:43:41date values. Navigate back up to month.
- 1:43:47Anytime we have any type of stacked
- 1:43:48visualization, remember we can do
- 1:43:50something like a 100% stacked
- 1:43:52visualization. In this case, 100%
- 1:43:53stacked area chart. This is the same
- 1:43:56data that we did previously, but just
- 1:43:58put into a graph in order to analyze it
- 1:44:02in a 100% format. Because of that, I'm
- 1:44:05just going to take that top chart up
- 1:44:07here, control C it, control + V, move
- 1:44:09into the bottom quadrant, put it into
- 1:44:11focus mode. As always, start with the
- 1:44:13title to what are the portion of data
- 1:44:16jobs in 2024. And then for the visual
- 1:44:19itself, I'll change this into a 100%
- 1:44:22stacked area chart. And bam. One thing I
- 1:44:25will note, this job count, anytime we
- 1:44:27did a percentage, I didn't do it in the
- 1:44:29last lesson, I probably should have, is
- 1:44:31I would probably annotate that it is a
- 1:44:34percentage by updating this value here.
- 1:44:37So now with this one, I feel we can read
- 1:44:39it a at least a little bit better than
- 1:44:41just the area chart. We can see towards
- 1:44:44the end of the year, data analyst
- 1:44:47actually go up in their proportion and
- 1:44:50they have around 30% of postings towards
- 1:44:54the end of the year. Pretty neat.
- 1:44:58All right, last visualization to build
- 1:44:59and that is a line and column chart.
- 1:45:03This one we're going to be looking at
- 1:45:04yearly and also hourly median salary for
- 1:45:08each of the 10 jobs that we have in the
- 1:45:10job title short column. Personally, I
- 1:45:13feel the yearly salary is more important
- 1:45:16in this case. So, we're going to make it
- 1:45:17the columns because they really stand
- 1:45:19out to me. And then from there, we'll
- 1:45:20make the hourly the line. And
- 1:45:22personally, I don't like starting from
- 1:45:24scratch if I don't need to. So, I'm
- 1:45:26going to grab this where's the highest
- 1:45:27paying job in data visualization we made
- 1:45:29on the other page. Copy it and then
- 1:45:31paste it on in here. Drag it down. We'll
- 1:45:33open up up into the focus mode. And the
- 1:45:36first thing, as always, I'm going to
- 1:45:37change that title to make sure we stay
- 1:45:38on task. And we'll change this to salary
- 1:45:41verse hourly pay of data jobs. I don't
- 1:45:44always do questions. I also sometimes do
- 1:45:46things like verses. People love verses.
- 1:45:48And so if you do that in this case, it
- 1:45:50gives them cues them in of what they
- 1:45:52should be looking at in the
- 1:45:53visualization. Now let's actually format
- 1:45:55this into what we want. We want either a
- 1:45:58line and stack column chart or line and
- 1:46:01stack clustered column chart. Doesn't
- 1:46:02really matter. We're only going to be
- 1:46:03using one column with this. We have job
- 1:46:06title on the x-axis, the column yaxis.
- 1:46:09I'm going to update this to median
- 1:46:11yearly salary and add USD onto it. And
- 1:46:15now we have the line yaxis. I'm going to
- 1:46:18drag salary hour average into this. And
- 1:46:20right now it's doing a sum. I don't want
- 1:46:23it to do a sum. I want it to do a
- 1:46:26median. And if you notice with that,
- 1:46:28whenever I click that, it then because
- 1:46:30the values weren't the same or couldn't
- 1:46:32match up with the original yaxis, it
- 1:46:35created a secondary yaxis. I'm going to
- 1:46:38change the title of this to median
- 1:46:41hourly salary USD. Now, one thing I
- 1:46:44could do to dress this up is I could add
- 1:46:46what's down here of data labels. We're
- 1:46:49going to go ahead and turn this on. This
- 1:46:51is data labels that are applied to all
- 1:46:53series. I could adjust it to only do the
- 1:46:55hourly. Anyway, so data labels hasn't
- 1:46:57been working properly. I'm going to go
- 1:46:59ahead. Let's actually try. We want to do
- 1:47:00it only the hourly salaries. I've
- 1:47:02clicked series. I want to apply this to
- 1:47:04hourly salaries. Turn on. Okay, it's on.
- 1:47:06It's working. If I want to do yearly, I
- 1:47:08can click yearly and then toggle this
- 1:47:10on. Or if I want to toggle it off. Let's
- 1:47:12say we want to do just the hourly. We
- 1:47:14can display it this way. Personally, I
- 1:47:16feel like there's too much information
- 1:47:17on this. I'm not going to apply data
- 1:47:19labels to this type of visualization. If
- 1:47:22we go back to our actual first
- 1:47:23visualization, this would be more one
- 1:47:25that I would apply data labels to. And
- 1:47:28with this, I could do things like add a
- 1:47:30background to make it call out a little
- 1:47:32bit better of what's going on with it.
- 1:47:35And then also going into value, making
- 1:47:37it something like bold, so it's a little
- 1:47:39bit easier to actually read. And bam.
- 1:47:43Yeah, that's actually pretty good. Not
- 1:47:45too bad. In this case, if I were to have
- 1:47:48the data labels, I'd most likely turn
- 1:47:51off something like the y-axis, like the
- 1:47:53values and the title because it already
- 1:47:54has it there. Additionally, under the
- 1:47:57grid lines, I just think that's too
- 1:47:58much. I could turn it off there. And now
- 1:48:00I have a more simplistic view of what's
- 1:48:03going on here with the data. So that is
- 1:48:06line and also area charts or combo
- 1:48:08charts if you will. Out of all these,
- 1:48:10the line chart is the most common right
- 1:48:13after column and bar. So, it pays to
- 1:48:15know how to format this bad boy. All
- 1:48:17right, you now have some practice
- 1:48:18problems to go through and get more
- 1:48:20familiar with how to use these different
- 1:48:22types of charts. In the next lesson,
- 1:48:24we're going to be jumping into other
- 1:48:26common types of charts such as pie,
- 1:48:28donut, tree map, and even scatter plots.
- 1:48:30With that, I'll see you there.
- 1:48:36In this lesson, we're going to be
- 1:48:37covering other common types of charts.
- 1:48:40We still will be covering some more
- 1:48:42after this, but I don't feel that
- 1:48:44they're as common as these here and also
- 1:48:46those line and column and bar charts.
- 1:48:49So, let's jump in and see what we're
- 1:48:50going to be making for this. First up,
- 1:48:52it's a pie chart. And in this, we're
- 1:48:54analyzing what portion of job postings
- 1:48:58don't mention a degree. Remember, our
- 1:49:00data sets on job postings. Sometimes
- 1:49:02they mention a degree or they don't.
- 1:49:04This marks true when it doesn't mention
- 1:49:06a degree. Anyway, we'll make a pie chart
- 1:49:08out of this. And then similarly, we'll
- 1:49:10make a donut chart, which is basically a
- 1:49:12pie chart with a giant hole in the
- 1:49:14middle, but instead of doing postings
- 1:49:15that don't mention a degree, we're going
- 1:49:17to do which job postings are marked as
- 1:49:20work from home. Something kind of like
- 1:49:22doing. Next, we'll get into making a
- 1:49:24tree map, which is this bad boy. And in
- 1:49:27this, we're showing what are the types
- 1:49:29of data jobs. Basically, it could be
- 1:49:30something like full-time, contractor,
- 1:49:34internship, part-time, or even temp
- 1:49:36work. Tree maps are really good because
- 1:49:38whenever you have them with other
- 1:49:39visualizations, people want to click on
- 1:49:41them and you'll be able to filter your
- 1:49:42data down to what you want to actually
- 1:49:44see. Anyway, the last visualization
- 1:49:45we're going to be doing is a scatter
- 1:49:48plot, which is going to look at the hour
- 1:49:50median salary verse the yearly median
- 1:49:52salary for different job titles. And as
- 1:49:56we're going to come to find out, there's
- 1:49:57definitely a trend between the two.
- 1:50:02So here's the visualization we're going
- 1:50:03to be building and it's looking at what
- 1:50:05portions of postings don't mention
- 1:50:07degree. Remember we're using that field
- 1:50:09of job no degree mention. I think in the
- 1:50:12intro I said it dimensions degree had
- 1:50:14that backwards. It's what portion of job
- 1:50:16postings don't mention degree. So in our
- 1:50:18common charts canvas we're going to come
- 1:50:20in and insert a pie chart. And after
- 1:50:22resizing I'm going to enter into focus
- 1:50:24mode. Remember we want to use that job
- 1:50:27no degree mentioned column. So I'm going
- 1:50:29to actually minimize this. Put job note
- 1:50:31degree mention into the legend and it's
- 1:50:34appearing the legend is appearing but
- 1:50:35nothing's appearing. So we actually have
- 1:50:36to put some values in. Specifically we
- 1:50:38want the count of that column. First
- 1:50:42things first I'm going to adjust the
- 1:50:43title to make sure we stay on task.
- 1:50:45Change it to what portion of postings
- 1:50:47don't mention degree. So not too bad. I
- 1:50:51do want to do some cleanup. Mainly I
- 1:50:53don't like this legend. I'd rather have
- 1:50:55data labels saying what is true and what
- 1:50:57is false. so they don't have to figure
- 1:50:59out which one's true and false from
- 1:51:00this. So under visual, I'll go down to
- 1:51:03detail labels. And for the label
- 1:51:05contents, we want to have the category.
- 1:51:08And I don't really care about the count.
- 1:51:10So I'm going to go to category percent
- 1:51:12of total. Scrolling down to the values,
- 1:51:14we'll make this a little bit bigger. Not
- 1:51:17too bad. I don't really like that it has
- 1:51:19two decimal places. I just want zero. So
- 1:51:22not too bad. So this is pretty good for
- 1:51:24the detail labels. Because of that, I
- 1:51:26don't want the legend. I'm going to go
- 1:51:27ahead and turn that off. Now, anytime
- 1:51:29I'm making a pie chart, I typically want
- 1:51:31to use only two to three values in it.
- 1:51:33That's why we're doing this true or
- 1:51:34false here. And with it, right, the
- 1:51:37question is what portion of postings
- 1:51:39don't mention degrees. So, immediately I
- 1:51:41want their eye to go to true. So, I do
- 1:51:43want true to be darker in this. However,
- 1:51:45I'm not really a fan of the colors. So,
- 1:51:47I'm going to go into slices. The true,
- 1:51:50we're going to maintain this dark blue.
- 1:51:53But for this false, I want a much
- 1:51:56lighter color. We'll leave it in the
- 1:51:57same palette even. And we'll make it
- 1:52:00this one. This, in my opinion, is much
- 1:52:02more readable and it draws it into where
- 1:52:05they need to go. So, as we can see from
- 1:52:07this, onethirds of job postings in
- 1:52:10general for all jobs don't mention the
- 1:52:12degree in the job posting.
- 1:52:16Next one to make is a donut chart. This
- 1:52:18one will be pretty easy in however we're
- 1:52:20changing it up. We're going to be
- 1:52:21looking at what portion of job postings
- 1:52:23are work from home. So I'm going to take
- 1:52:25our original pie chart, control C it and
- 1:52:27control V it. Drag it up to the top
- 1:52:29right hand corner and then I'm going to
- 1:52:30change this into a doughnut chart. Now
- 1:52:32with this one and we're looking at work
- 1:52:34from home and we have a column on that
- 1:52:36that's also a true and false value. So
- 1:52:38two values. So perfect for this. So, I'm
- 1:52:41going to drag that into the legend
- 1:52:42itself and take out job no degree
- 1:52:44mention along with putting that jerk
- 1:52:46work from home job work from home in the
- 1:52:49values and removing that job no degree
- 1:52:51mention. Put this bad boy into focus
- 1:52:52mode. As always, we're going to update
- 1:52:54that title first to what portion of
- 1:52:57postings are work from home. I'm not a
- 1:53:00fan of the coloring scheme once again.
- 1:53:02So, we'll change that true to that dark
- 1:53:04color and we'll change the false to the
- 1:53:06lighter one. All right. Not bad. I am
- 1:53:07noticing though the tool tips. Right.
- 1:53:10Um, it is it's very verbose in what it
- 1:53:13has there. We do need to update that.
- 1:53:15And I changed it to is work from home
- 1:53:18and job count. So, is work from home
- 1:53:20true. Looks like job count. It's like
- 1:53:2263,000 jobs or 13%. Don't forget also
- 1:53:26when we probably need to update that pie
- 1:53:27chart as well. Now, when you scroll over
- 1:53:29it, we can see, hey, is no degree
- 1:53:31mentioned? True. And the count, which
- 1:53:33count didn't update. Okay, that's
- 1:53:35looking better.
- 1:53:38Next up is tree map. And this is really
- 1:53:41good visualization to show a breakdown
- 1:53:44of what's available. But mainly I like
- 1:53:45it because if we actually go back to the
- 1:53:47report itself with everything else on it
- 1:53:49makes it to where you want to actually
- 1:53:51interact with it. So in the case of the
- 1:53:52tree map, if I wanted to look at just
- 1:53:54full-time roles, I can click on that and
- 1:53:57then all the other data filters for
- 1:53:59that. So it's a great way to draw users
- 1:54:01in and interact with your report. So
- 1:54:04inside of here, we're going to click
- 1:54:05here and we're going to add a tree map.
- 1:54:07I'm going to drag it to the bottom right
- 1:54:08hand corner. Go into focus mode. For
- 1:54:11this, we're using a new column we
- 1:54:12haven't used yet. It's this job schedule
- 1:54:15type. And job schedule type has
- 1:54:17different values in it. Actually has
- 1:54:20this actually needs a lot of cleanup,
- 1:54:22but it has things like contractor,
- 1:54:24full-time, part-time, PDM, temp work.
- 1:54:27We'll actually get into cleaning this up
- 1:54:30in the next chapter in chapter three uh
- 1:54:32chapter 3 on Power Query. So stand by
- 1:54:34for that. Anyway, we're going to drag
- 1:54:36this job schedule type into the
- 1:54:37categories and then also drag it into
- 1:54:40the values. First thing I want to do
- 1:54:42like usual is update the title to what
- 1:54:45are the type of data jobs. Now there's a
- 1:54:48few too many values here. You can see
- 1:54:50it's even breaking down further in the
- 1:54:52bottom right hand corner. I want to
- 1:54:53filter this down to only specific values
- 1:54:56for the job schedule type. Specifically,
- 1:54:59if I move over this filter, whenever it
- 1:55:02has multiple different ones like
- 1:55:03contractor and full-time, contractor to
- 1:55:05internship, there's only like two, 45,
- 1:55:0740. I don't really want those. I want
- 1:55:08just the single value. So, in this case,
- 1:55:10contractor, full-time, internship,
- 1:55:14part-time, PDM doesn't have a lot, so
- 1:55:16we're not going to do that. We'll do
- 1:55:17temp work and we'll call it good. Close
- 1:55:20out of this filters pane. So, at least a
- 1:55:22little bit more readable in what are the
- 1:55:24different selections and the top values
- 1:55:26uh that we can get. Now, I'm not a big
- 1:55:28fan of all these different colors,
- 1:55:30especially if you go back to your
- 1:55:31report. Like, it just doesn't match the
- 1:55:33palette that we're doing here. And also,
- 1:55:35in general, I don't like a lot of
- 1:55:37different colors. It gets visually
- 1:55:38distracting. Your users won't know where
- 1:55:41to put their eyes. In our case, we do
- 1:55:44want their eyes to go to probably the
- 1:55:46most the biggest value, if you will. So,
- 1:55:48once again, we want to get this darker.
- 1:55:50And then the other values, these smaller
- 1:55:52ones, we want a little bit lighter. So
- 1:55:54what we can do is under format visual
- 1:55:57under colors, we could change each one
- 1:56:00of these colors individually for what it
- 1:56:02is. Like if I want to change this to
- 1:56:04contractor to pink. I'm not really a fan
- 1:56:06of this. Instead, we go into advanced
- 1:56:08controls and use this conditional
- 1:56:09formatting. Under the format style,
- 1:56:11we're going to change this into a
- 1:56:13gradient. And let's change this into
- 1:56:16those colors. So for the minimum value,
- 1:56:18let's use what we were using previously,
- 1:56:20this light color theme. And then for the
- 1:56:22maximum value, we're going to use the
- 1:56:24darker one of this. This looks okay.
- 1:56:26Click okay. And bam. Now we have
- 1:56:29something that's a lot more manageable
- 1:56:31in the eyesight. And when compared to
- 1:56:33all our other visuals, it fits in in the
- 1:56:35visuals on where we want them to draw
- 1:56:37their attention. Last thing we need to
- 1:56:38do is just update the tool tips for
- 1:56:40this. We'll call this one schedule type
- 1:56:42for the category and then for the
- 1:56:44values, job count. All right, not too
- 1:56:46bad. getting this back into focus mode.
- 1:56:48The other thing that we want to do is we
- 1:56:50want to put because right now we can see
- 1:56:51it, but what is the relative percentage
- 1:56:54of each of these relative to each other?
- 1:56:57So, what I'm going to do is come in here
- 1:56:58under format visual under the data
- 1:57:00labels. I'm going to go ahead and turn
- 1:57:02them on. And if you notice, they're
- 1:57:04actually a count. I don't really want
- 1:57:06count, but we'll deal with that for the
- 1:57:07time being. We will change, however, the
- 1:57:10value decimal places to zero. And I will
- 1:57:12make them slightly bigger. Now, like I
- 1:57:15said, I don't want to count for here. I
- 1:57:17can't change this percentage inside of
- 1:57:18here. But what I can do is going into
- 1:57:22values, clicking on this down arrow.
- 1:57:25Right now, we have count. But then we
- 1:57:27have this show value as we could do no
- 1:57:29calculation or percent of grand total,
- 1:57:34which is actually exactly what we want.
- 1:57:36We see that full-time jobs are 90% of
- 1:57:37the job postings, contractors are 7%,
- 1:57:40internships are less than 1%, and
- 1:57:42following.
- 1:57:46The last visualization to make is a
- 1:57:47scatter plot. Scatter plots are great at
- 1:57:50showing the relationship between two
- 1:57:53different values. In this case, we can
- 1:57:55show the relationship between hourly and
- 1:57:58yearly median salary for these different
- 1:58:00job titles. So, let's put this bad boy
- 1:58:02together. In our canvas, we're going to
- 1:58:04throw in this scatter chart. I'm going
- 1:58:06to go into focus mode. For this one,
- 1:58:09we're going to just start off instead of
- 1:58:10doing the values, we're going to start
- 1:58:11with that x-axis, putting the yearly
- 1:58:14salary data there and then the hourly in
- 1:58:16the y ais. For both of these, we want to
- 1:58:19aggregate by the median. Then we want to
- 1:58:22break it up right by the job title. So,
- 1:58:24we need to put in the legend that job
- 1:58:26title short. All right, not too bad.
- 1:58:28Before we get too far, I do want to
- 1:58:30update the title on this to hourly verse
- 1:58:33yearly salary of data jobs. People love
- 1:58:36some verses. I'm also going to clean up
- 1:58:38what's in the field well to make these
- 1:58:40values more readable. So there's a lot
- 1:58:42more readable. We can see what's up here
- 1:58:43in the top right hand corner. Machine
- 1:58:46learning engineers have 155,000 for the
- 1:58:48hour for the yearly salary, $60 for the
- 1:58:51hourly salary. Might need to consider
- 1:58:53changing my job. Anyway, once again, if
- 1:58:55I go back to the actual report pane,
- 1:58:58look at this. I mean, the the coloring
- 1:59:00on this just doesn't match the other
- 1:59:01pallets. And two, it's just highly
- 1:59:03distracting. If I go back into focus
- 1:59:05mode, where the heck do you need to look
- 1:59:07on this? Well, with a scatter plot in
- 1:59:08general, I don't want to necessarily
- 1:59:10draw your attention any specific
- 1:59:12location in this kind of manner. So, I
- 1:59:14want to probably just remove the colors.
- 1:59:17However, this one's a little bit more
- 1:59:19tricky. In this case, we're going to go
- 1:59:21to format your visual and we go to
- 1:59:22markers and expanding it out and
- 1:59:25scrolling on down to colors. If I try
- 1:59:27to, it doesn't let me change the color.
- 1:59:30I can, however, change the transparency.
- 1:59:33We're going to take that transparency to
- 1:59:35100%. Basically, not make it 100%
- 1:59:37transparent. You can't visual visualize
- 1:59:39it. And I'm going to go into border.
- 1:59:42With this, I'm going to uncheck the
- 1:59:44match fill color. And now, you see all
- 1:59:46of them are this dark gray color. What I
- 1:59:48can do is I can come in and make it that
- 1:59:49dark blue color that I like. And I can
- 1:59:52make the width of this bigger. That's a
- 1:59:55little bit too big. I could also adjust
- 1:59:56the transparency on this, but then my
- 1:59:58visuals aren't available. Okay. So, not
- 2:00:01bad. But I'd argue it still needs well
- 2:00:03one this is highly confusing because I
- 2:00:05have this job title legend up here with
- 2:00:07colors and none of it correlates. So
- 2:00:10under format visual under the same thing
- 2:00:11I'm going to turn off the legend first
- 2:00:14and then under category labels I'm going
- 2:00:16to turn this on. This is allows us to
- 2:00:19now format those different uh category
- 2:00:21labels. I made it slightly bigger and we
- 2:00:24can actually see where everything falls
- 2:00:26and we can see something like data
- 2:00:28analyst is down at the bottom left hand
- 2:00:31corner. Oh gosh. All right. So, not too
- 2:00:33bad. Anytime I have any of these scatter
- 2:00:34plots, I would want to I want to see is
- 2:00:37there some sort of relationship. I could
- 2:00:39in this case put in a trend line, make
- 2:00:42it a lighter color and a little bit
- 2:00:44transparent so it doesn't like take up
- 2:00:46the entire thing. And then bam, we can
- 2:00:49actually see, okay, in queue our end
- 2:00:51users in, there is actually a trend. If
- 2:00:54there's a higher yearly salary, there's
- 2:00:56probably going to be a higher median
- 2:00:58hourly salary. Those that have senior
- 2:01:00roles, like senior data engineers,
- 2:01:01senior data scientists are going to pay
- 2:01:03more than their counterparts. Well, at
- 2:01:06least in some cases, looks like this
- 2:01:08data engineer in hourly gets paid more
- 2:01:11than senior data engineer in their
- 2:01:13hourly. There's no
- 2:01:16there's no more visuals to build, but I
- 2:01:18want to talk about a feature within
- 2:01:20PowerBI dealing with editing
- 2:01:23interactions. If you remember from
- 2:01:24earlier, I talked about with this tree
- 2:01:26map. It's great because I can click it
- 2:01:28and then it will filter other data. But
- 2:01:30let's do something like I'm going to
- 2:01:32click contractor, which has less. What
- 2:01:34the heck am I supposed to make out of
- 2:01:36this doughut chart? And what the heck am
- 2:01:39I supposed to make out of this pie
- 2:01:40chart? Like I'm not even like you can
- 2:01:42see they're not even the same size. I'm
- 2:01:44supposed to do the math on my head and
- 2:01:46try to figure out how they are
- 2:01:47different. Basically, I'm not liking how
- 2:01:50they're crossfiltered. Well, that's
- 2:01:52where if we go into the format tab, they
- 2:01:55have this edit interactions. I'm going
- 2:01:57to go ahead and click it and it stays
- 2:01:59clicked. As you notice this, these icons
- 2:02:02popped up and then when I turn it off,
- 2:02:03those icons pop away. So, this enables
- 2:02:06you to edit interactions. But there's
- 2:02:09only one icon here that there's a
- 2:02:11there's actually a little bit of a bug
- 2:02:12with PowerBI. You can't see some of
- 2:02:15these visualizations and their
- 2:02:17appropriate things for edit interaction.
- 2:02:19So I'm going to make these other charts
- 2:02:20a little bit smaller. Now we can see
- 2:02:23when I'm clicked on the tree map, all
- 2:02:26these other three around these have
- 2:02:29these options to edit the interactions.
- 2:02:33Anyway, the easiest one to understand is
- 2:02:34for the tree map, right? I can turn off
- 2:02:37to make it none for all of these, right?
- 2:02:40So they're not getting filtered. So as a
- 2:02:43test, whenever I I just turned off edit
- 2:02:45interactions as a test, I can click
- 2:02:48different things in here and none of the
- 2:02:50other ones are getting or having
- 2:02:53affected. However, whenever I go to the
- 2:02:55pie chart, it is interacting with
- 2:02:58others, right? I I did it specifically
- 2:03:00for this tree map. Now, I typically
- 2:03:03don't use this none. Let my turn back on
- 2:03:05edit interactions. I typically don't use
- 2:03:07this none to remove the filtering.
- 2:03:10Remember, by default, it was on this
- 2:03:13highlight for at least for the pie
- 2:03:15charts. For this scatter plot, they only
- 2:03:17have one option, and that's only filter.
- 2:03:19We're going to leave scatter plot as
- 2:03:21filter. Anyway, with the tree map
- 2:03:22selected, let's change these other ones
- 2:03:24now from being highlight to filter. I'm
- 2:03:27going to change it for that. And also
- 2:03:28the pie chart. Now, whenever I click the
- 2:03:30tree map and filter down, notice what it
- 2:03:33does. it doesn't actually do that
- 2:03:35shrinking down. It actually adjusts the
- 2:03:38actual pie chart itself and uh donut
- 2:03:40chart. So it makes a lot more readable.
- 2:03:43However, this is just for the tree map.
- 2:03:44If I go over to the scatter plot, I'm
- 2:03:46going to look at something like data
- 2:03:47engineers and I clicked on this. It's
- 2:03:49still going to do this option. Notice
- 2:03:52now I'm selected on the scatter plot.
- 2:03:54This for the pie chart is on highlight.
- 2:03:56I'm going to change this to filter. And
- 2:03:58for the doughut chart, I'm going to
- 2:03:59change it also to filter. Okay, now just
- 2:04:02testing it. Yep, it's getting adjusted.
- 2:04:04Two more I want to update for this. So,
- 2:04:06same thing. I'm going to select the pie
- 2:04:07chart. Click in here. Don't like how
- 2:04:09it's doing it. I'm going to change this
- 2:04:10one. And then it click into the doughut
- 2:04:13chart. Going to click this one. Oh,
- 2:04:15don't like how it's done. Going to
- 2:04:16change this one to filter. And now
- 2:04:19everything is back or at least in
- 2:04:21configured in a way that I actually like
- 2:04:23it. And so I can make these charts back
- 2:04:26to the same size they were. Basically
- 2:04:27hid those icons that were being hidden
- 2:04:29andclick edit interactions. Now just
- 2:04:32testing it out. Can click contractor.
- 2:04:34Yep, everything filters down. I can
- 2:04:36click the true portion of work from
- 2:04:37home. Yep, everything filters down like
- 2:04:39I want. So edit interactions is sort of
- 2:04:43an advanced concept to understand get
- 2:04:45through. So that's why we have some
- 2:04:46practice problems to now for you to go
- 2:04:48through not only build those pie and
- 2:04:51those doughnut charts, but also get some
- 2:04:53familiarity with how to use edit
- 2:04:54interactions. With that, I'll see you in
- 2:04:57the next one.
- 2:05:01Welcome to this lesson on maps. And
- 2:05:04although I use these less frequently
- 2:05:07like thing than things like bar charts,
- 2:05:09column charts or line charts, these do
- 2:05:11these map visuals do have their place
- 2:05:13from time to time. So let's jump in into
- 2:05:17understanding what we're actually going
- 2:05:18to be doing for this lesson in building
- 2:05:20three different maps. Now PowerBI by
- 2:05:23default has three different map types.
- 2:05:25The first one is called just map. Really
- 2:05:27special, I know. The second one is
- 2:05:30called field map because it looks like a
- 2:05:32field map. And then the third one right
- 2:05:34here is ArcGIS for PowerBI map.
- 2:05:37Basically, they want you to buy the
- 2:05:39extra ArcGIS. We'll get into all that in
- 2:05:41a little bit. Anyway, for the basic
- 2:05:43first map overview, we're going to be
- 2:05:45looking at which countries don't mention
- 2:05:48degrees in their job postings. This
- 2:05:51displays a dot over our specified
- 2:05:53location, in our case, country. And the
- 2:05:55size of it is relative, in our case, to
- 2:05:57the job count. We can also break it down
- 2:06:00further into this pie chart inside of
- 2:06:02here for true or false values. In our
- 2:06:05case, true that it doesn't mention a
- 2:06:07degree in the job posting. Next up is
- 2:06:09our filled map. And I'll be honest, out
- 2:06:11of all the maps here, find this the most
- 2:06:13useless, but I do want to cover it
- 2:06:15anyway. It fills in a certain color. In
- 2:06:17this case, we're just filtering the
- 2:06:19color based on what country is which
- 2:06:22country, which in my mind, I'm like, I
- 2:06:24don't really care about that. That's why
- 2:06:25I'm not really that big of a fan of this
- 2:06:27type of map, although I do want to go
- 2:06:29through it so you're aware of it. Now,
- 2:06:31the last one I actually like the most of
- 2:06:33RGis for PowerBI. And this one, we're
- 2:06:35looking at what are the highest paying
- 2:06:37jobs globally. Here you can see, well,
- 2:06:39this country right here, this big one
- 2:06:41has the highest paying. Kind of fishy.
- 2:06:43Anyway, this one's going to come with a
- 2:06:45little bit of a catch. not not the
- 2:06:47country, the map itself. And so my main
- 2:06:50recommended one is this first one.
- 2:06:54So let's get into building these map
- 2:06:55visuals. We're going to start by
- 2:06:57creating a new page. And I'm going to
- 2:06:59call this map charts. Now, if you didn't
- 2:07:01actually work through the first chapter
- 2:07:02in this, you're going to come to find
- 2:07:04out that the map charts aren't going to
- 2:07:05work. We have to actually enable them.
- 2:07:08And this is done by going into file and
- 2:07:10then options and settings and then
- 2:07:12options. I'm going to navigate down here
- 2:07:14under global to security. And for this,
- 2:07:18we want to make sure that custom v uh
- 2:07:20visuals are enabled. ArcJS for PowerBI,
- 2:07:23which is one of the maps, and then the
- 2:07:24map and field map visuals are also
- 2:07:26enabled. These are the main two that you
- 2:07:28need for this lesson. Now, if you set up
- 2:07:30a PowerBI Pro license and you've
- 2:07:33connected it to your PowerBI app, you
- 2:07:36may need to take these additional steps
- 2:07:37that I did in order to enable it in the
- 2:07:40PowerBI service so you don't get black
- 2:07:42blocked from doing it in the app. If you
- 2:07:44didn't set up a free or pro account with
- 2:07:46PowerBI, this portion is not applicable
- 2:07:48to you. Anyway, I'm going to go to the
- 2:07:50settings icon up here and I'm going to
- 2:07:51navigate to the admin portal. In the
- 2:07:53search bar over here, I'm going to type
- 2:07:55in map. And for this I want to ensure
- 2:07:57that use RGIs maps for PowerBI is
- 2:08:00enabled and also that the map and field
- 2:08:03map visuals are enabled. Whenever you
- 2:08:05enable them you need to then go ahead
- 2:08:07and apply. And like usual this can take
- 2:08:10up to 15 minutes to work.
- 2:08:14So while you're waiting for that to
- 2:08:15load, let's jump into building our first
- 2:08:17map visual. And like again this is going
- 2:08:19to be looking at which countries don't
- 2:08:21mention degrees in their job postings.
- 2:08:24in our blank canvas. I'm going to select
- 2:08:26map. I'll move it into that top
- 2:08:28quadrant. And then we go into focus
- 2:08:30mode. All right. For this one, we're
- 2:08:32going to be using we want to aggregate
- 2:08:34it by the job country location. So, I'm
- 2:08:36going to go ahead and put that in here.
- 2:08:38Now, notice there's a dot now for each
- 2:08:40of the countries. And just as a
- 2:08:42reminder, just so you can check it out,
- 2:08:44I could I'm going to X out of this this
- 2:08:46job country. And I'm going to drag job
- 2:08:48location onto here. If you notice by
- 2:08:50this, there's a lot more dots on here.
- 2:08:52If I scroll over it, these get very more
- 2:08:56in deep uh detail. Like this was from
- 2:08:58Crawford'sville, Indiana. If you're
- 2:09:00watching this from there, Indiana, give
- 2:09:02a comment in the video below. Anyway,
- 2:09:05we'll use job location at a different
- 2:09:07time, but right now, this is just too
- 2:09:09much data on this map visual. I don't
- 2:09:12like it. I'm going to go ahead and X out
- 2:09:13of it. Instead, we're going to drop job
- 2:09:16country down into location. Now, this
- 2:09:18also has the option for using latitude
- 2:09:22and longitude and this will be
- 2:09:23applicable to all the map visuals that
- 2:09:26we have. This results in even more
- 2:09:29precise data because sometimes your
- 2:09:31location data isn't going to populate in
- 2:09:33this map chart because it's not able to
- 2:09:35figure it out on where it needs to go.
- 2:09:37So, if you have latitude and longitude
- 2:09:39data, which we don't have in this case,
- 2:09:41I recommend you use that instead because
- 2:09:43it's more precise. Now, let's make these
- 2:09:45bubbles a different size. We're going to
- 2:09:47use this bubble size. I'm going to drag
- 2:09:49job title short into here and it's now
- 2:09:51going to do a count of job title short.
- 2:09:53I'm going to rename this down to job
- 2:09:56count and then also this location to
- 2:09:58country. So that way whenever I scroll
- 2:10:00over something like the United States, I
- 2:10:02can see that hey the country is United
- 2:10:03States and the job count is 140,000
- 2:10:06jobs. Now remember, we want to see the
- 2:10:08breakdown of what countries don't
- 2:10:10mention a degree requirement in the job
- 2:10:12posting. So, I'm going to take job no
- 2:10:15degree mentioned and put it into the
- 2:10:17legend. I'm going to change this to no
- 2:10:19degree mentioned. And now, scrolling
- 2:10:21back over the United States, we can see
- 2:10:24that it's false for 109,000 values and
- 2:10:27then it is true for 30,000 values. And
- 2:10:31so, I may I didn't update the title to
- 2:10:32keep us on track and update it to which
- 2:10:35countries don't mention degrees in job
- 2:10:37postings. Going back to that build
- 2:10:39visual, there's one other field that's
- 2:10:40very common that's in basically every
- 2:10:43single visualization and that's this
- 2:10:44tool tips. We can add extra fields to
- 2:10:48this tool tips to appear. If I wanted
- 2:10:50to, I could take that salary year
- 2:10:52average, drag it into here, make it into
- 2:10:55something like median, and then change
- 2:10:56this to median yearly salary. And now
- 2:10:59whenever I scroll over this, I can see
- 2:11:01that when there's no mention of a
- 2:11:03degree, the salary is $104,000
- 2:11:06on median. But when there is a mention
- 2:11:09of degree, it's 113,000. So it's a
- 2:11:12little bit higher whenever we do mention
- 2:11:13a degree in there. Pretty interesting
- 2:11:15insight.
- 2:11:18Next, let's get into the field map. Like
- 2:11:20I mentioned in the beginning, I'm not
- 2:11:21really a fan of this, so we're going to
- 2:11:23kind of rush through it just so you're
- 2:11:24familiar with it and understand it. But
- 2:11:26as far as the capabilities, as I can see
- 2:11:28from this, or as you can see from this,
- 2:11:30I don't get a lot of insights out of it.
- 2:11:33Back in our canvas, I'm going to go
- 2:11:34ahead and insert a filled map. I'm going
- 2:11:37to start from scratch and not copy and
- 2:11:38paste just to make sure that you get it
- 2:11:39down of what we're actually doing here.
- 2:11:41We're going to use location field. And
- 2:11:43for specifically for that, we're going
- 2:11:45to use job country. I'm going to go
- 2:11:47ahead and call this country. Next, right
- 2:11:50underneath it is the legend. And as we
- 2:11:53had in that final one, I can go ahead
- 2:11:55and put job country into here and
- 2:11:57putting this into focus mode. This is
- 2:12:00giving me all sorts of colors. Anyway,
- 2:12:02if I scroll over it, I can see things
- 2:12:04like the tool tips to providing that it
- 2:12:06is what the country is. The other field
- 2:12:08in here that I wanted to do if tool tips
- 2:12:10again, I could drag in that salary or
- 2:12:12average into here. Make that median and
- 2:12:15call that median yearly salary USD. Now,
- 2:12:17when I scroll over to United States, I
- 2:12:18get that as well. Anyway, what I would
- 2:12:20hope would be more intuitive out of
- 2:12:22this, like something like the legend.
- 2:12:24Instead, let's say I wanted to color it
- 2:12:26in like a scheme or a gradient using
- 2:12:28something like the salary year average
- 2:12:30column. Now, it's going to go ahead and
- 2:12:33color it, but it basically gives
- 2:12:34distinct colors for all the different
- 2:12:37values. Doesn't also even do aggregation
- 2:12:40in the legend. Basically, it's a hot
- 2:12:41mess. Not a fan of this bad boy. So, I'm
- 2:12:44going to go ahead and put country back
- 2:12:45in here. update the title to where our
- 2:12:48job postings globally. And we're going
- 2:12:50to call it a day with this one.
- 2:12:54Now, where field maps fail, this is
- 2:12:56where I like RGis. They come in handy
- 2:12:59and they actually satisfies what I need.
- 2:13:01In this case, we're going to go through
- 2:13:03and actually make based on median salary
- 2:13:06what is the different color coding or
- 2:13:09the color scheme necessary to actually
- 2:13:11get it to visually indicate what is the
- 2:13:13highest salary. So, back in our canvas,
- 2:13:15I'm going to go ahead down here under
- 2:13:16ArcJS for PowerBI. I'm going to insert
- 2:13:18it in. We're going to go into focus mode
- 2:13:20so we can actually read this. Now, this
- 2:13:23is the main issue we're going to have
- 2:13:25with ARGIS.
- 2:13:27We don't need to create a sign in. We're
- 2:13:29going to be able to go in and actually
- 2:13:30continue as guest. But, as you notice,
- 2:13:33there is a sign in here. So, if we're
- 2:13:36going to go forward with sharing a
- 2:13:39dashboard, specifically in the PowerBI
- 2:13:41service with an ARGIS visual, we're not
- 2:13:45going to be able to do it unless your
- 2:13:47company or you pay the thousands of
- 2:13:49dollars to have an Argis subscription.
- 2:13:52Long story short, if you're just like a
- 2:13:53student or somebody like me, a solo
- 2:13:55entrepreneur, you can, yeah, use this to
- 2:13:58make graphs and visuals for you only,
- 2:14:00but as soon as you want to start
- 2:14:01distributing to somebody else, you're
- 2:14:03going to have to pay a heck of a price.
- 2:14:04This is a report that I built that had
- 2:14:06an ArcJS for PowerBI in it that I
- 2:14:09uploaded to the PowerBI service.
- 2:14:10Whenever I actually went to it and tried
- 2:14:12to use it with ARG uh ARGIS, it says
- 2:14:15this map does not meet the requirements
- 2:14:17for publish reports. So, it's proof that
- 2:14:19you can't use it unless you're paying
- 2:14:21for it. Anyway, very similar. We can use
- 2:14:23latitude or longitude or the location.
- 2:14:25So, I'm going to drag job country into
- 2:14:27that location column. And the visual
- 2:14:29does take a second or two to load, but
- 2:14:32loads nonetheless. and we'll change
- 2:14:34location to country. Then scrolling on
- 2:14:36down below latitude, longitude, we have
- 2:14:38size and also color, time, and then also
- 2:14:42tool tips and join layer. Oh, and find
- 2:14:44similar. We're going to just focus
- 2:14:46mainly on size and color. Now, I'm going
- 2:14:50to start with the size and put salary
- 2:14:51year average into here. And in this
- 2:14:53case, I'm going to change it to median.
- 2:14:56Notice it is doing because I did size,
- 2:14:59it's going to do size of the bubble
- 2:15:01sizes. And this thing, I'll be honest, I
- 2:15:03can't really read it. We can adjust it
- 2:15:05later. But that's why we're actually
- 2:15:06going to shift this one down into color
- 2:15:09as this is much more intuitive. Although
- 2:15:11I don't like the color scheme of this.
- 2:15:13This is much more intuitive of where are
- 2:15:15the higher salaries compared to
- 2:15:17everybody else. I'll change this to
- 2:15:20median yearly salary USD. Now, whenever
- 2:15:22I scroll over it, it's not providing
- 2:15:24anything. Probably got to put this into
- 2:15:26tool tips. And then I'm going to change
- 2:15:28this to median yearly salary USD. Now
- 2:15:33scrolling over this, we don't get a
- 2:15:35country anymore, but at least we're
- 2:15:37getting the median value, which isn't
- 2:15:40correct. What's going on here? I still
- 2:15:43have it on sum. I'm an idiot. I should
- 2:15:45have it on median. Okay, median's out in
- 2:15:48the US. Looking a lot like more like the
- 2:15:50value that we need to have. Job country
- 2:15:51is not appearing on here. So apparently
- 2:15:53I got to drag this also into the tool
- 2:15:55tip. And now I'm getting country and
- 2:15:57also median year. Okay, so that's
- 2:15:59basically all the formatting we're going
- 2:16:00to do outside of here. The other thing
- 2:16:02we can do now to start formatting,
- 2:16:04especially the color and how it's all
- 2:16:06set up is over here on this lefth hand
- 2:16:09menu. This expand and collapses. The
- 2:16:12next one gets into the layers. We can
- 2:16:14see a breakdown of how they're actually
- 2:16:16breaking up the colors. And then we can
- 2:16:18also go into symbology to change if we
- 2:16:21want how we're doing the coloring by job
- 2:16:24country. We don't want to mess with
- 2:16:25that. We want actually go into the style
- 2:16:27options. We're not going to change the
- 2:16:29shape cuz we're not doing shape, right?
- 2:16:31We're doing color. We're going to change
- 2:16:33this. And personally, I like the blues
- 2:16:36and I like this blue three to where
- 2:16:40higher values are darker in color.
- 2:16:42Closing this out just to inspect from
- 2:16:44it. Okay, this is getting what I want.
- 2:16:47Other things to note from this menu
- 2:16:48besides just this layers aspect, I can
- 2:16:50also go and change the different base
- 2:16:52maps that I have. I could change it into
- 2:16:54a dark gray canvas instead. And I really
- 2:16:56liking that. We'll leave it light gray.
- 2:16:58Then they have other things like a
- 2:16:59selection tool, a search tool, and then
- 2:17:02also do with further analysis. We're not
- 2:17:04going to go any further into that. I
- 2:17:06feel like this is as good as we're going
- 2:17:07to get with this, and this is all we
- 2:17:09need to know for this type of visual.
- 2:17:11Also, I forgot a title. Where are the
- 2:17:13highest paying jobs? So, don't forget to
- 2:17:15put that in. So, that is an intro into
- 2:17:17map visuals. you now have some practice
- 2:17:19problems to go through and get more
- 2:17:21familiar with these different maps. In
- 2:17:24our next lesson, we're going to be
- 2:17:25covering our final portion on different
- 2:17:28charts you can build in PowerBI. It'll
- 2:17:30be focused on uncommon charts. So, it's
- 2:17:32going to be rapid pace, basically just
- 2:17:34getting you an intro into what maps are
- 2:17:36also available inside the PowerBI
- 2:17:38service before we move on to other
- 2:17:40greater things like tables, slicers, and
- 2:17:42whatnot. With that, I'll see you there.
- 2:17:48Welcome to this lesson on uncommon
- 2:17:50charts. Basically, there's a fitting
- 2:17:52title because we covered common charts.
- 2:17:53Now, we're going to cover some uncommon
- 2:17:55ones. Now, there's actually like a dozen
- 2:17:57other charts that we haven't covered
- 2:17:58yet. And actually, I'm going to just
- 2:18:00cover them briefly here at the beginning
- 2:18:02so that way you're aware of them, but
- 2:18:04for this, we're going to be focusing on
- 2:18:05three main charts. And well, for that,
- 2:18:07let's jump into the PowerBI.
- 2:18:09Specifically, we're going to be building
- 2:18:11a ribbon chart and then what's known as
- 2:18:14a waterfall chart. And then finally,
- 2:18:16this bad boy down here is a funnel
- 2:18:18chart. These are all pretty easy to
- 2:18:19build, so we should be pretty quick to
- 2:18:22cover them. Now, going into our
- 2:18:24notebook, let's look at some other uncom
- 2:18:26uncommon types that we're not going to
- 2:18:28even get into in this video or even for
- 2:18:30the remainder of this course. If I go to
- 2:18:31the insert tab, I have this section on
- 2:18:34AI visuals. They have Q&A, key
- 2:18:36influencers, decomposition tree, and
- 2:18:37narrative. You can also access them down
- 2:18:40here in the actual visualization pane.
- 2:18:42Anyway, these AI features or AI features
- 2:18:45I should put in quotes are really bad
- 2:18:48and I don't find any use out of them.
- 2:18:50Here I just click Q&A and let's just
- 2:18:53type in a question that I think it maybe
- 2:18:55another way on the answer. But it says,
- 2:18:56"What is the median salary?" Oh, I
- 2:18:58didn't spell right of data analyst. I'll
- 2:19:00go ahead and type that. And yeah, um
- 2:19:05yeah, it doesn't it doesn't even give us
- 2:19:06a visual. I cannot stand this Q&A
- 2:19:08feature or really any of the AI map
- 2:19:11visuals and so I'm not going to go over
- 2:19:13them and I'm not going to recommend
- 2:19:14them. Next on this insert tab is power
- 2:19:17platforms and this you can create uh
- 2:19:20pageionated reports basically breakdown
- 2:19:22of reports that you want to send to
- 2:19:24somebody else. You can integrate Power
- 2:19:26Apps or even Power Automate. Both Power
- 2:19:29Apps and Power Automate are great tools
- 2:19:32to dive into further after this, but
- 2:19:35frankly for the basics of PowerBI, it's
- 2:19:37beyond the scope of this. And so we're
- 2:19:39not going to be going into any of this
- 2:19:42for this course. And on that note,
- 2:19:45related looking down here in the
- 2:19:46visualization pane, they also have
- 2:19:47something like the R script visual and
- 2:19:49the Python script visual. Anyway, if I
- 2:19:52drag something or I create something
- 2:19:53like a Python visual, yeah, we can put
- 2:19:56some values in here, but overall, as you
- 2:19:58can see, you have to be able to write in
- 2:20:00for Python, you have to be able to write
- 2:20:02in Python. For R, you have to be able to
- 2:20:03write in R. I'm assuming most of you
- 2:20:06don't have the capabilities to write in
- 2:20:07Python or R. And I honestly don't use
- 2:20:11Python or R unless I really need to into
- 2:20:12a PowerBI report. So, not going to
- 2:20:15recommend this either.
- 2:20:19And with that, let's get into our first
- 2:20:21uncommon chart, which is a ribbon chart.
- 2:20:24Ribbon charts are pretty cool because
- 2:20:25they show over specifically I like to
- 2:20:27use it on a time basis. This is quarter
- 2:20:30down here. Remember, we can use our
- 2:20:32drill down. I'll drill down one more
- 2:20:33into month. You'll be able to see what
- 2:20:36is the top value over time. That's how
- 2:20:38it's actually sorting it. The lowest
- 2:20:40value is at bottom. I'll be honest, this
- 2:20:42one is a little bit of a hot mess. This
- 2:20:44is a little bit too many values on here.
- 2:20:46I could make this a little bit more
- 2:20:49readable by only having something like
- 2:20:50data scientist, engineer, and scientist
- 2:20:52on here to see what are the top salaries
- 2:20:55throughout the year. So, let's get into
- 2:20:57creating this bad boy. I already started
- 2:20:59a new page called uncommon charts. You
- 2:21:01need to go ahead and do the same. And
- 2:21:02inside of here, I'm going to insert in a
- 2:21:04ribbon chart. Put into that quadrant.
- 2:21:06And I'm going to go into focus mode. For
- 2:21:08the x-axis, I'm going to go ahead and
- 2:21:10use a time series data. So, we're going
- 2:21:12to use that job posted date. Right now,
- 2:21:14it's filtered to year. So remember,
- 2:21:17we're going to use all the way to the
- 2:21:19right these this drop down arrow right
- 2:21:20here. And I'm going to go into quarter
- 2:21:21for the time being. Now, as far as the
- 2:21:23y-axis, we're going to once again use
- 2:21:25that median salary like we've been
- 2:21:27doing. Change this from sum to median
- 2:21:29and rename this to median yearly salary
- 2:21:32USD. So now we can see even with just
- 2:21:34this, we can see that yeah, over the
- 2:21:36year, oh, median salary has gone up
- 2:21:39slightly. But now we want to break it
- 2:21:41down based on the job titles themselves.
- 2:21:44So, we'll take that job title short,
- 2:21:45throw it into the legend, change that to
- 2:21:48job title, and then bam, we can see over
- 2:21:50the year what has happened here. It
- 2:21:53looks like senior data scientist came
- 2:21:55out of top the end of the year with
- 2:21:57$152,000.
- 2:21:58Now, like I mentioned before, I'm not
- 2:22:00really a fan of this. I would probably
- 2:22:01more likely recommend something like a
- 2:22:03line chart for this. Although, even with
- 2:22:05this, there's just way too many lines on
- 2:22:07here. So, I'd probably want to filter it
- 2:22:09down with the number of jobs that it has
- 2:22:11in here. But line chart, it's going to
- 2:22:13be my preference over something like a
- 2:22:14ribbon chart.
- 2:22:18Next up is a waterfall chart. And it
- 2:22:21gets its name because it kind of looks
- 2:22:23like it goes step to step to step kind
- 2:22:25of like a waterfall does. But the point
- 2:22:27of this type of visualization is to show
- 2:22:30how portions of a final value are made
- 2:22:33up of things that can add and subtract
- 2:22:35from it. In this case, we're showing
- 2:22:38what is based on the total salary for a
- 2:22:40data analyst salary breakdown. This
- 2:22:42darker blue bar is what they're getting
- 2:22:44at the end. So, $80,000. And then as it
- 2:22:47goes through these lighter blue are the
- 2:22:49different things that add to the salary
- 2:22:52and this uh gray is things that subtract
- 2:22:54from the salary giving us our final
- 2:22:56total. This type of visualization is
- 2:22:58very common in financial roles. Now if
- 2:23:02you recall from our data we don't have
- 2:23:05it in a manner actually we just need to
- 2:23:06go to table view. We don't have any data
- 2:23:09especially numerical data in a in a
- 2:23:11format that's necessary to actually make
- 2:23:13this type of chart. So we need to insert
- 2:23:16some data in to create a chart like
- 2:23:18this. Back in the home tab I'm going to
- 2:23:20go in and we're going to enter data.
- 2:23:23We're going to ahead and insert some
- 2:23:24values into here. Specifically for base
- 2:23:27salary we'll say it starts at 75,000.
- 2:23:30Bonus is at 5,000. Stock options are at
- 2:23:337,000. Not too shabby. Benefit values is
- 2:23:36at 8,000. Taxes induction at -15,000.
- 2:23:39I'm going to change these column names
- 2:23:41by double clicking on it. This will be
- 2:23:43the column of comp. This will be of
- 2:23:45amount. I'm using this for our waterfall
- 2:23:47chart. So, I'll just call this waterfall
- 2:23:49data. We'll go ahead and load this in.
- 2:23:52Inside the data pane, I can see that
- 2:23:54it's appearing now with a mountain comp.
- 2:23:55I can also go into the table view.
- 2:23:58Selecting that table, we can see that
- 2:24:00it's in there. So, let's go ahead and
- 2:24:01insert in that waterfall chart, going to
- 2:24:04put in that top quadrant. For the
- 2:24:06category, I'm going to go ahead and drag
- 2:24:08in comp. And then we're not going to use
- 2:24:10breakdown because I want to break down
- 2:24:11any further. We're going to use the
- 2:24:13yaxis specifically. We'll drag in that
- 2:24:16for this. Right now, we'll just put it a
- 2:24:17sum. These individual values could be
- 2:24:20broken down more, maybe with another
- 2:24:22column, but that's beyond the scope of
- 2:24:25this. We're not going to do it. We're
- 2:24:26going to keep this simple. I'm going to
- 2:24:27open this up into focus mode. And the
- 2:24:30main thing that stands out to me is the
- 2:24:32coloring. Once again, I'm not a big fan
- 2:24:34of different colorings. I do like that
- 2:24:36the aspect of they're doing green for
- 2:24:38positive values, red for negative, and
- 2:24:40blue for the final, but still that's
- 2:24:42just too much in my opinion. So, I'm
- 2:24:44going to go to format your visual and
- 2:24:46underneath here. I'm trying to find out
- 2:24:47where I can change the color. A little
- 2:24:49shortcut is I'm going to use the search
- 2:24:51bar up here and just type color. I'm
- 2:24:53going scroll down until I find the
- 2:24:55colors that I wanted. Oh, there it is.
- 2:24:56That's what I want to change right here.
- 2:24:58For increase, I'm going to make it a
- 2:25:00light blue. For decrease, I'm going to
- 2:25:02make it a dark gray. And then for the
- 2:25:04total, I'm just going to change it to
- 2:25:05this dark blue. All right. So, bam,
- 2:25:07that's a waterfall chart. And like I
- 2:25:09mentioned, this is has a lot of
- 2:25:11negatives to it in the fact that you
- 2:25:13usually don't get data that's in this
- 2:25:16format. So, you need to use something
- 2:25:18like Power Query, which is going to be
- 2:25:19in the next chapter, in order to clean
- 2:25:21data up and get it into this type of
- 2:25:23format. Makes an entire hassle.
- 2:25:28Last one to cover is a funnel chart. And
- 2:25:31similar to the last chart, you have to
- 2:25:33have the data in a certain format in
- 2:25:36order to feed it in and actually be able
- 2:25:38to make or reconcile what's going on
- 2:25:40here. Anyway, the point of this this
- 2:25:42funnel is to show how people or whatever
- 2:25:44it may be goes through a funnel process.
- 2:25:47So, in this case, this is job applicants
- 2:25:49per stage. They those that view the
- 2:25:51posting is around 5,000. Those that
- 2:25:53clicked apply, it was around 4K. started
- 2:25:56the application around 3K, submitted 2K,
- 2:25:58interviewed 1K, and hired 0K, which
- 2:26:02going over the toolkit, looks like it's
- 2:26:03around 120. So, only 2.4% out of this
- 2:26:06100% got into getting a job. That's what
- 2:26:10funnel charts are great at showing. So,
- 2:26:12let's create this real quick. We're
- 2:26:13going to throw in a funnel chart. Put
- 2:26:15into focus mode. And we don't have any
- 2:26:17data. We just need to enter that data.
- 2:26:19We'll put in first the value of view job
- 2:26:21postings at 5,000. clicked apply at
- 2:26:243,800, started application at 2,900,
- 2:26:28submitted at 2,200, interviewed at 500,
- 2:26:31and then hired at 120. We'll label the
- 2:26:34column names as stage, and then
- 2:26:36applicants. Last thing we'll do is just
- 2:26:38need to make sure we update the uh the
- 2:26:40table name, and then change it to funnel
- 2:26:42data. We'll go ahead and click load.
- 2:26:44Now, with our funnel data, I'm going to
- 2:26:46drag applicants or sorry, I'm going to
- 2:26:48drag stage into the category and then
- 2:26:51applicants into the values. Now, one
- 2:26:53thing I didn't like from last time is
- 2:26:55how it goes 54321 and then 0. Okay, that
- 2:26:58I don't feel like that's descriptive
- 2:26:59enough. So, under format your visual,
- 2:27:01I'm not even going to search for it. I'm
- 2:27:02just going to search and I'm going to
- 2:27:04type decimal. And we have value decimal
- 2:27:06places. I'm going to put this as zero or
- 2:27:09sorry, not zero. We're going to put as
- 2:27:10one. So, now this shows more of a
- 2:27:12breakdown of what's going on here. so we
- 2:27:13can actually see what's going on. And
- 2:27:15that's the one thing I'm going to change
- 2:27:16with this.
- 2:27:19All right, one bonus section that I do
- 2:27:21want to add into this and that is on get
- 2:27:24more visuals. What do I mean by that?
- 2:27:26Well, if you notice, we have these
- 2:27:27ellipses down here at the bottom of the
- 2:27:29visualization pane and it says, hey, get
- 2:27:31more visuals. I'm going to go ahead and
- 2:27:33click it and I can say I can import it
- 2:27:36from file, remove visual, what not. Here
- 2:27:37I want to get more visuals. Now, this is
- 2:27:40going to pop up and show us some
- 2:27:44different ways we can get other visuals.
- 2:27:45I'm going to go back real quick and call
- 2:27:47out something. You may try this. If
- 2:27:49you're not logged in, if you don't have
- 2:27:51an account, you don't you can't you're
- 2:27:52not signed in, you're not going to be
- 2:27:54able to go through and get more visuals
- 2:27:56without actually signing in. If you're
- 2:27:58not able to do that, don't worry about
- 2:28:00it. Not a big deal. We have some
- 2:28:01practice problems using these, but I've
- 2:28:03made them optional, so you don't need to
- 2:28:06necessarily do them. But I'm going to
- 2:28:08just go through and showcase what is
- 2:28:10capable what you're able to do with
- 2:28:12this. Anyway, we're going to go ahead
- 2:28:14and search for something specifically
- 2:28:15box and whisker chart. And it's good
- 2:28:18whenever you're looking at any of these
- 2:28:20that you look at the ratings and that at
- 2:28:22least does have some ratings. This one
- 2:28:24doesn't have any ratings. Makes me
- 2:28:26question it. I've tried this one from
- 2:28:27data scenarios. So, we're going to go
- 2:28:29with that. Now, for this, I have the
- 2:28:32ability to now add this. I do want to
- 2:28:35call something out real quick. If I go
- 2:28:36back, if I go into this other one, Box
- 2:28:39and Whiskers Pro, they actually have
- 2:28:41underneath it plans and pricings. And
- 2:28:44you can get into some where depending on
- 2:28:46the users and where you want to publish
- 2:28:48it, but they are going to charge you for
- 2:28:49this. So, be careful of which ones you
- 2:28:52choose if you want to get it charged or
- 2:28:54not. You'd have to enter in your credit
- 2:28:55card to do all that kind of stuff. So,
- 2:28:56you're not going to get charged without
- 2:28:58knowing it, but it may come at a cost.
- 2:29:00They may not display it unless you're
- 2:29:01paying. Anyway, I want this one. I'm
- 2:29:03going to go ahead and click add. Now we
- 2:29:06notice uh underneath the divider here we
- 2:29:08now have this box and whiskers chart
- 2:29:10which is a new one that we have
- 2:29:11available. I put job title short into
- 2:29:14the category and then put salary year
- 2:29:16average into the sampling we want for
- 2:29:19this and salary average into the values
- 2:29:22specifically. I don't want sum, I want
- 2:29:24the median. And then open this bad boy
- 2:29:26up so we can see it. Bam. Now I have a
- 2:29:29visualization that was not previously
- 2:29:31accessible to me via the standard ones
- 2:29:34in here and I can actually visualize
- 2:29:37something for free. Pretty neat. Now I
- 2:29:39have noticed with a lot of these the
- 2:29:40customization that you can actually do
- 2:29:43with this. Yeah, there is a lot of
- 2:29:45options. I'm not going to go into
- 2:29:46customizing this one. The customization
- 2:29:48can get kind of limited and they can
- 2:29:50sometimes be buggy because they're not
- 2:29:52officially PowerBI approved all the
- 2:29:53time. So that is something to think in
- 2:29:56mind whenever you decide to go out and
- 2:29:57get a visualization within the get more
- 2:29:59visuals. All right, it's now your turn
- 2:30:02to go through and build some of these
- 2:30:03uncommon charts. We actually have some
- 2:30:05practice problems as well that include
- 2:30:07price problems on get more visuals if
- 2:30:09you want to get experience with that.
- 2:30:10Once again, those portions of the
- 2:30:11practice problems will be optional
- 2:30:13because you do have to have an account
- 2:30:14login to sign in. So don't worry if you
- 2:30:17can't accomplish it. In the next lesson,
- 2:30:18we're going to be jumping into tables
- 2:30:21and matrices. With that, I'll see you
- 2:30:23there.
- 2:30:27In this video, we're going to be
- 2:30:28covering tables and also matrices. And
- 2:30:32especially if you have end users like
- 2:30:34your boss, maybe that's more familiar
- 2:30:36with something like Excel. They're going
- 2:30:38to from time to time request that you
- 2:30:39put stuff into tables. Anyway, jumping
- 2:30:42into the PowerBI file to show what we're
- 2:30:44going to be doing in this lesson. As we
- 2:30:47can see from that homepage, we've
- 2:30:49covered everything we're going to cover
- 2:30:50for charts. We're now on to other
- 2:30:51visuals. for right now we're covering
- 2:30:53tables. Then we'll cover cards and next
- 2:30:54slicers. Anyway, let's go into tables.
- 2:30:57We're going to be building this table
- 2:30:59which aggregates all the different key
- 2:31:01information from job postings that
- 2:31:03contain a yearly salary. Tables are
- 2:31:06pretty nice cuz I can click on the
- 2:31:08different columns and I can sort them
- 2:31:10depending on what value is where. And we
- 2:31:12can see something like this. We're data
- 2:31:14scientists at Netflix. We're getting
- 2:31:15$920,000.
- 2:31:17Gosh, full-time job. Anyway, we're also
- 2:31:20going to be going through not just this
- 2:31:21uh how to make the table itself, but
- 2:31:23also conditional formatting. That's what
- 2:31:24these blue data bars are right here and
- 2:31:26then these icons right here. And we're
- 2:31:28going to be using some quick measures to
- 2:31:30make these stars. Now, after we cover
- 2:31:32tables, we're going to go into matrices.
- 2:31:35If you're familiar with pivot tables in
- 2:31:38Excel, that's basically what this is.
- 2:31:41This is allows us to do aggregation
- 2:31:44on certain columns. In this case, we're
- 2:31:46going to do aggregation on the job title
- 2:31:47short column to see things like salary
- 2:31:50and count. We can also have hierarchies
- 2:31:52within it. In this case, I can go dive
- 2:31:54into business analyst and I can look at
- 2:31:56it in the different quarters as it
- 2:31:58progresses along. I use conditional
- 2:32:00formatting for the bars. And then over
- 2:32:02here on the right hand side, we have job
- 2:32:04trends, which is using spark lines,
- 2:32:06which is the last thing we're actually
- 2:32:07going to cover for this.
- 2:32:10So, let's start with creating this
- 2:32:12table. I'm going to come into create a
- 2:32:14blank page. I'm going to rename it.
- 2:32:16Actually, call it something creative
- 2:32:18like tables. And inside of here, I'm
- 2:32:20going to come in here and select the
- 2:32:22table icon. We're going to extend it all
- 2:32:24the way over and make it in the top
- 2:32:26half. Now, there's only one field well
- 2:32:28here, and that's the add data fields
- 2:32:29right here for columns. So, we can come
- 2:32:31in here and start dragging things in.
- 2:32:32We're going to start with just the job
- 2:32:34title short column, which shows those 10
- 2:32:36values. And then I actually want to see
- 2:32:38what is the full job title. So, I'm
- 2:32:40going to drag that next into here. After
- 2:32:42this, I want the company information.
- 2:32:44So, I'm put in company name. I want the
- 2:32:46salary information. So, we'll drag in
- 2:32:48salary year average. Right now, it's
- 2:32:50doing aggregation. We'll fix that in a
- 2:32:52second. And then finally, the last
- 2:32:55column that we're going to drag in for
- 2:32:56the time being is that job schedule
- 2:32:58type. Okay, getting back to that sum of
- 2:33:00salary. We don't want to necessarily do
- 2:33:02a sum. There are some cases like this.
- 2:33:04Oh my gosh, I can't even see this. I'm
- 2:33:06going to open up the focus mode. There
- 2:33:07are this case where it is doing a sum
- 2:33:09and that's because there's multiple jobs
- 2:33:12that fit this job title and company
- 2:33:14name. So it sums up all the sellers. I
- 2:33:16don't want to do an aggregation. So I'm
- 2:33:18going to click this down arrow right
- 2:33:19here and I'm going to say don't
- 2:33:20summarize it. Now I'm going to go back
- 2:33:22into the report so we can actually see
- 2:33:24it. All right, not too bad. I do have a
- 2:33:26bunch of blank values for salary or
- 2:33:28average. I just want to see the postings
- 2:33:30that have a yearly salary associated
- 2:33:33with it. So, going into the filters pane
- 2:33:36under salary year average, I'm going to
- 2:33:38say show items when the value is not
- 2:33:41blank. And let's see if this works. Bam.
- 2:33:44Does work. Now, we're getting a bunch of
- 2:33:45salary values in there. Okay, let's go
- 2:33:48back into focus mode and do some just
- 2:33:50final cleanup. I'm going to adjust this
- 2:33:52column right here so we can see all
- 2:33:53them. We need to adjust all these
- 2:33:54different column titles and update to
- 2:33:56make it look a little more readable. Job
- 2:33:58title, job title, full, company, yearly
- 2:34:01salary, and job type. Not too bad. Now,
- 2:34:04with something like this, it's important
- 2:34:06to understand if I put this in to a
- 2:34:07visual and somebody wanted access to
- 2:34:09this data, remember, they can go to
- 2:34:11those more options and then export the
- 2:34:14data and then they wanted it, they could
- 2:34:16have it in something like Excel and if
- 2:34:17they're more of a master of it, they can
- 2:34:18use it there.
- 2:34:21All right, let's get back to our table.
- 2:34:23There's one thing I want to do to this
- 2:34:25to spice it up. not necessarily
- 2:34:27conditional formatting just yet, but
- 2:34:29instead looking at what our final table
- 2:34:31is, I want to add these stars in here
- 2:34:34and be able to showcase based on a
- 2:34:37certain salary, if it meets my salary,
- 2:34:39it being five stars, and then down to
- 2:34:41zero stars. Now, in order to do this,
- 2:34:43back in our table, I'm going to go to
- 2:34:45that modeling tab, and what we're going
- 2:34:47to use is a quick measure. Now, measures
- 2:34:50in general, remember, we're going to go
- 2:34:52really in detail in it in chapter 4, but
- 2:34:55this we're going to give a sneak peek
- 2:34:56and see in the capabilities of something
- 2:34:58like quick measures, which honestly
- 2:35:00we're going to come to find out it's
- 2:35:02quite limited. These quick measures
- 2:35:04generate DAX in order to satisfy our
- 2:35:08need. So, we could do things like
- 2:35:10aggregation, filtering, time
- 2:35:12intelligence, totals, but I'm want we're
- 2:35:14going to go down to this one here of
- 2:35:16text and specifically star ratings. The
- 2:35:19first thing we need to do, it's pretty
- 2:35:20self-intuitive. We need a base value,
- 2:35:22and this is the value want to convert
- 2:35:24into a star rating. Remember, we're
- 2:35:26going to be using this from that salary
- 2:35:29year average column. We want to base it
- 2:35:30off of that. So, I'm going to drag it
- 2:35:32into add data. We don't want this to be
- 2:35:34sum, right? We want this to be median.
- 2:35:36So, I'm going to go ahead and change
- 2:35:37this underneath here. And now we can do
- 2:35:40there. It's going to provide what are
- 2:35:42the number of stars we want and we want
- 2:35:44what is the value for the lowest star
- 2:35:46rating. Well, I'm going to say, hey, my
- 2:35:48lowest point that I want to give a star
- 2:35:50for any star for, I'm going to say let's
- 2:35:52say 75,000. And then something that
- 2:35:55would exceed my expectations in salary,
- 2:35:57I'm going to give that of 150,000. So,
- 2:36:00I'm going go ahead and click add. And as
- 2:36:03we can see, I'm going to uh hide this
- 2:36:05off to the side. It generated all the
- 2:36:08different DAXs necessary. This is up in
- 2:36:10the formula bar up at the top and
- 2:36:12conveniently it ended up putting it into
- 2:36:14or unconveniently it ended up putting it
- 2:36:16into our funnel data table. Now this is
- 2:36:19actually we don't I don't want in the
- 2:36:21funnel data table and also need to
- 2:36:22change its name. So we'll do both of
- 2:36:24those things. First is I want to change
- 2:36:26the home table to job posting flat and
- 2:36:29then the name up here to salary star
- 2:36:32rating. If you notice it updated in the
- 2:36:34formula. All right. All right, I'm going
- 2:36:35to go ahead and close out of that
- 2:36:36formula. Click into here. Now, for this
- 2:36:39table, we want to add that in. So, I'm
- 2:36:42going to take this salary star rating as
- 2:36:44designated by this measures icon next to
- 2:36:46it. We're going to drag it and put it
- 2:36:48right in that first column. Opening up
- 2:36:50focus mode so we can actually see what's
- 2:36:52going on here. And adjusting the column
- 2:36:54so we can actually read it. Okay, this
- 2:36:55is looking like it's working. So,
- 2:36:57something like 32,000 doesn't get any
- 2:36:59stars. whereas something like 163,000
- 2:37:03does get five stars because it's above
- 2:37:04that 150,000. Anyway, I really like the
- 2:37:06star rating, especially that quick
- 2:37:08measure. It makes it quick and easy to
- 2:37:10create a measure like this.
- 2:37:12Unfortunately, going back to quick
- 2:37:14measures and looking at it, honestly, I
- 2:37:17don't get a lot of value out of any of
- 2:37:19these other ones. I've tried to use it
- 2:37:21before with the exception of this. And
- 2:37:23really, I get more value out of writing
- 2:37:25my own DAX to create measures, which
- 2:37:28like I said, we're going to go into it
- 2:37:29more in chapter 4. So, just stay tuned
- 2:37:31for that.
- 2:37:34Next, let's get into building our
- 2:37:36matrix. And with this, very similar in
- 2:37:39format in that we want to do aggregation
- 2:37:41of the job titles, but we're going to do
- 2:37:43finding that of count and then also the
- 2:37:45different hourly and median salaries.
- 2:37:47We're not going to be inserting in the
- 2:37:49trend lines just yet or the conditional
- 2:37:50formatting. We'll be doing that after we
- 2:37:52set up the um matrix. So, inside of our
- 2:37:54canvas, I'm going to go ahead and insert
- 2:37:56in a matrix. I'm going put the job title
- 2:37:59short into the rows. And then they have
- 2:38:02columns, but really we're going to want
- 2:38:04to do values. But let me just show you
- 2:38:06what's going on with this uh for I could
- 2:38:09put something like columns, the job
- 2:38:11countries in the columns. And then let's
- 2:38:13say I wanted like the count, which we
- 2:38:15are going to keep. So, I'm going to drag
- 2:38:17job tile short to the values. And we're
- 2:38:20going to do count here. Now we have
- 2:38:22based on this right columns are along or
- 2:38:25the countries rows are the job tile
- 2:38:26short. And then inside of here we have
- 2:38:29all the different counts depending on
- 2:38:31the country with something as much as
- 2:38:33country and how wide this table is. Now
- 2:38:36not finding much use out of that. So I'm
- 2:38:38actually going to just remove job
- 2:38:39country. And we still have that job
- 2:38:41count in there. Other values we want to
- 2:38:43drag into there are that yearly salary
- 2:38:46and hourly salary. adjusting them both
- 2:38:49to be those median values. Then I'm
- 2:38:51going to go ahead and put this into into
- 2:38:53focus mode and then also cleaned up all
- 2:38:55the columns to job title, job count,
- 2:38:58yearly salary, and hourly salary. Now
- 2:39:00remember, right, this is a matrix. So we
- 2:39:03can create a hierarchy within here. And
- 2:39:07as we did previously, I use the, as I
- 2:39:09showed previously, I've used the
- 2:39:11quarter. So I'm actually going to grab
- 2:39:12quarter within underneath job posted
- 2:39:15date. I'm going drag it into the rows.
- 2:39:18Now, for this expand icon right here, I
- 2:39:21can see based on a quarter how it breaks
- 2:39:24down. Some quick formatting things to
- 2:39:26note on this matrix. What we can also do
- 2:39:29going into format visual and then under
- 2:39:31visual, you can change things like the
- 2:39:33subtotals. In this case, it's only
- 2:39:35giving us column sub totals or sorry,
- 2:39:38row subtotals. So, I can toggle it on
- 2:39:40and off what I want it. This case, it's
- 2:39:42not going to give us those column sub
- 2:39:44totals. The other thing is what happens
- 2:39:46if we want to format these numbers
- 2:39:48further. Let's take specifically the job
- 2:39:51count. So I can go down here to specific
- 2:39:53column have job count selected. And then
- 2:39:56underneath values we can actually change
- 2:39:59the display units that we want cuz right
- 2:40:01now 12,000 or 128,994 that's kind of
- 2:40:05unreadable. So what I can do is I can
- 2:40:07change that to thousands and then for
- 2:40:09the decimal place put in a zero.
- 2:40:11Similarly, I can do the same for
- 2:40:13something like the yearly salary as
- 2:40:15well. I could change that to thousands.
- 2:40:18And then that one's also more readable.
- 2:40:20For hourly salary, I'm not getting much
- 2:40:22value out of those two decimal places.
- 2:40:24So, we're just going to change that to
- 2:40:25zero. Bam. Much more readable the data
- 2:40:28that's coming out of this. Now, with
- 2:40:30these matrices, right, especially since
- 2:40:31we did that hierarchy of the quarter
- 2:40:34underneath here, you also have these
- 2:40:36drill downs up here for you to drill
- 2:40:38down into. And if you wanted to, you can
- 2:40:41expand all the way down by using the
- 2:40:44navigation up there in the top right
- 2:40:45hand corner. Overall, I like to usually
- 2:40:47just dive into one myself and then dive
- 2:40:50further as necessary.
- 2:40:54Next, let's get into some conditional
- 2:40:56formatting to spice these visuals up and
- 2:40:59draw people's attention to where we want
- 2:41:01them to actually look for this. We're
- 2:41:03going to start with our matrix first,
- 2:41:05and I want to do job count. What we're
- 2:41:07going to do is click this do uh down
- 2:41:09arrow. And you notice right here we have
- 2:41:12conditional formatting. There's a few
- 2:41:14options. Background color, font color,
- 2:41:16data bars, icons, and web URL. Let's
- 2:41:18start with background color first. Now,
- 2:41:21we can get it to do based on a rule. I'm
- 2:41:24typically not a fan actually rules of
- 2:41:26like, hey, set it at with this value be
- 2:41:28a certain color. Instead, I'm going to
- 2:41:30go to this of gradient, and it
- 2:41:33automatically picks up that we're doing
- 2:41:34a count of the job title. And it's
- 2:41:37setting the lowest value at this light
- 2:41:39blue and this other one the maximum at a
- 2:41:41darker blue. Kind of like it. We'll go
- 2:41:43with it. And bam. Key things to think
- 2:41:45about though when you use these blue
- 2:41:48type colors. I'll be honest, it's a
- 2:41:50little bit harder to read the numbers
- 2:41:52that's going on right here. So if I
- 2:41:54want, I can go back into conditional
- 2:41:56formatting for that background color and
- 2:41:58change this to be slightly less dark.
- 2:42:02And I think the numbers are a little
- 2:42:03more readable in that matter. All right.
- 2:42:05Next one to notice for the conditional
- 2:42:07formatting. We'll go to yearly salatary
- 2:42:09conditional formatting. We're going to
- 2:42:10be doing we'll skip font colors for now.
- 2:42:12We're going to go to data bars. In this
- 2:42:14the format style is data bars. And so
- 2:42:16the only option available available.
- 2:42:18We're already doing the median yearly
- 2:42:20salary for this. And in it they have we
- 2:42:23can specify basically the color. So
- 2:42:25positive bars are this blue. Negative
- 2:42:27bars you can make if you want it to be
- 2:42:29red and the axis black. What I'm going
- 2:42:32to do, it's all our values are positive.
- 2:42:35So, I'm going to go ahead and just
- 2:42:36adjust this to a lighter blue color so
- 2:42:38that way we can still read those numbers
- 2:42:40behind it. Click okay. And bam, we get
- 2:42:43this. I think it's still a little too
- 2:42:45dark. Unfortunately, we have to go back
- 2:42:47in all the way to data bars and then
- 2:42:50select the color I want. I'm going to do
- 2:42:51this light blue one. Click okay. All
- 2:42:53right. That's a lot more readable. I'm
- 2:42:55also going to go through and do this
- 2:42:56real quick for the hourly column as
- 2:42:59well. Making it at that light blue. then
- 2:43:01applying it. Bam. Looks good. This is
- 2:43:03all we can do for this matrix. So, let's
- 2:43:05switch on over to our table. I went to
- 2:43:08focus mode. So, let's start with that
- 2:43:10year yearly salary. We're going to
- 2:43:11eventually put data bars, but I just
- 2:43:13want to show conditional formatting. We
- 2:43:14could do something like a font color
- 2:43:17where it does a gradient from where it
- 2:43:19needs to go and where it needs to be.
- 2:43:21Overall font color. I know the coloring
- 2:43:23is probably pretty bad on this. In
- 2:43:25general, I don't I don't get a lot of
- 2:43:26value at font color, so I don't use that
- 2:43:28very often. So, what I'll do is I'll
- 2:43:29open it up. go to remove conditional
- 2:43:31formatting and we'll select remove font
- 2:43:33coloring and go back in to add that
- 2:43:36conditional formatting for data bars
- 2:43:38specifying that that positive bar we
- 2:43:40want that that light blue color. All
- 2:43:41right, the next thing with this let's
- 2:43:42give it some icons specifically
- 2:43:44depending on a job type that I'm trying
- 2:43:47to get to or that I want maybe I want to
- 2:43:50be able to signify via an icon to cue my
- 2:43:53eyes into it. So I'll go to job type go
- 2:43:56into conditional formatting and for this
- 2:43:58one select icons. Right now the format
- 2:44:00that style that's using is rules and so
- 2:44:03that's why it's using the is whatever
- 2:44:05text and then assigning it a certain
- 2:44:07icon. We can specify we can specify
- 2:44:10where we want the icon left of data icon
- 2:44:13only or right of data. Right now we'll
- 2:44:15just leave it left of data. And you can
- 2:44:17even change the type. They have a few
- 2:44:20different options you can choose from.
- 2:44:21We're going to end up changing it to
- 2:44:24we're going to change it to this one
- 2:44:25right here with these circles and these
- 2:44:27up and downs. Basically, I want it to be
- 2:44:30green whenever if value is. In our case,
- 2:44:33I want it to be uh when it's full-time.
- 2:44:35Part-time will be a yellow. I'm not
- 2:44:38really a fan of it. And then red will be
- 2:44:41I don't want to I don't even want to
- 2:44:42look at it. That will be for jobs that
- 2:44:44are contractors. Go ahead and click
- 2:44:46okay. And now we got visual indications
- 2:44:49of the different types of jobs along
- 2:44:51with this. Now, there's one other type
- 2:44:53of conditional format we can do, and
- 2:44:55that's with web URLs. And we're actually
- 2:44:58going to get to that in our practice
- 2:45:00problems. So for those that supported
- 2:45:01the course, you're going to get to that
- 2:45:03eventually.
- 2:45:06All right, the last thing we want to do
- 2:45:08is add a spark line. And that's what
- 2:45:11this is at the end of this that shows
- 2:45:13it's called job trends, but it's the
- 2:45:15count of jobs over time. We can see very
- 2:45:18quickly that there's a trend over time
- 2:45:21where we have this dip down in October,
- 2:45:23November area. Anyway, I like using this
- 2:45:26especially in these it's only about 10
- 2:45:28columns or sorry 10 rows here. Great way
- 2:45:31to use it. But as far as our table, not
- 2:45:33really a big fan of using it inside of
- 2:45:36all these different values. It's sort of
- 2:45:38cumbersome at that point. So inside of
- 2:45:40what we have built some forward, I'm
- 2:45:41going to go back into focus mode and
- 2:45:43since the matrix is selected, I'm going
- 2:45:45to go to insert. Add a spark line is not
- 2:45:48grayed out. We can actually add a spark
- 2:45:50line. For this, we're going to do the
- 2:45:51counts of jobs. Like usual, we're going
- 2:45:53to use that job title short column in
- 2:45:55order to calculate that. So I'll select
- 2:45:57job title short count. And then finally,
- 2:45:59we'll also do for that X-axis. We want
- 2:46:02to do job title short. We'll click
- 2:46:04create. Now I had a brain fart. And I
- 2:46:07completely set that up wrong. But how
- 2:46:10can we actually fix that? Well, if we go
- 2:46:12back down into our fields, specifically
- 2:46:14our value fields, click this down arrow.
- 2:46:16I'm going to go into edit spark line for
- 2:46:18the x-axis. Right? We're not using job
- 2:46:20title short. We want to use that date,
- 2:46:22right? Because we want to see it over
- 2:46:24time. Specifically, I don't want all the
- 2:46:26different days. So, I'm going to go into
- 2:46:27date hierarchy and I'm going to just
- 2:46:29select month. Click okay. Bam. That's
- 2:46:33actually what we wanted with this. And
- 2:46:35I'm going to rename this to job trends.
- 2:46:38If you notice the spark line, it has
- 2:46:40this sort of trailing arrow similar to
- 2:46:42that spark line up there to signify that
- 2:46:44it is a spark line that we created. Now,
- 2:46:46let's say we wanted to format this spark
- 2:46:49line further. I would go into underneath
- 2:46:51format your visual under visual
- 2:46:53scrolling on down all the way to the
- 2:46:54bottom we have spark lines but the most
- 2:46:56important thing is all the way at the
- 2:46:57bottom anyway the spark line selected is
- 2:46:59job trends we could change the data
- 2:47:02color if we want we could also adjust
- 2:47:04the width to be bigger or smaller but
- 2:47:06the thing I want to draw attention to is
- 2:47:08this next section on markers you could
- 2:47:11in here mark things like the highest and
- 2:47:14then also the lowest unfortunately they
- 2:47:17only have one color option So, if I
- 2:47:20wanted to, I could call it the red, but
- 2:47:21then I'm like, which one's highest?
- 2:47:22Which one's lowest? Um, because of this,
- 2:47:25I'm going to say I'm not going to
- 2:47:27actually use it. Fortunately, with
- 2:47:29Excel, they give you more fine-tuning
- 2:47:30capability to give certain colors to
- 2:47:32certain values. So, I could find that
- 2:47:34more useful, but in this case, n I'm
- 2:47:36going to leave it off. All right, so not
- 2:47:38so bad. We just went through tables and
- 2:47:40matrices. You have some practice
- 2:47:42problems to go through and get familiar
- 2:47:44with how to use these. All right, with
- 2:47:46that, see you in the next one.
- 2:47:51In this lesson, we're going to be
- 2:47:52covering the five different types of
- 2:47:54cards in PowerBI that we can take
- 2:47:57advantage of. And these are really
- 2:47:59important at displaying key
- 2:48:01characteristics about our data. Well,
- 2:48:03instead of me telling you about it, let
- 2:48:05me actually show you what I mean. This
- 2:48:06is our first project that we're going to
- 2:48:07be building at the end of this chapter.
- 2:48:10We don't need to go too much into it,
- 2:48:11but the key thing here is these are
- 2:48:14cards up at the top of the dashboard.
- 2:48:16That's where cards typically located
- 2:48:18are. These are the key information that
- 2:48:20we want users to see first. And they can
- 2:48:23display key information like job count,
- 2:48:26median salary, and even that previous
- 2:48:28five-star ranking that we did
- 2:48:30previously. Can show it here. So, let's
- 2:48:33get into building some cards.
- 2:48:37So, in our canvas, I've created this new
- 2:48:38page. I'm going to go ahead and call it
- 2:48:40something like cards, real original. And
- 2:48:42I'm going to insert our first one that
- 2:48:43we're going to go over, and that's card.
- 2:48:45All right, with this we have a field
- 2:48:47attribute that we can drag into. We're
- 2:48:50going to start simple by just showing
- 2:48:51the median yearly salary. So I'm going
- 2:48:53to drag salary year average in there. It
- 2:48:55does some aggregation. We're going to
- 2:48:56change this to median. All right. So
- 2:48:58this shows the value and then underneath
- 2:48:59it says median year average. I'm
- 2:49:01actually going to change that to median
- 2:49:03yearly salary USD. Now we can do some
- 2:49:06formatting to clean this up.
- 2:49:08Specifically going under format value. I
- 2:49:09can go into the callout value. I can
- 2:49:11make that a little bit bigger if I
- 2:49:12wanted to. I can then also go into the
- 2:49:14category label. make this one a little
- 2:49:15bit bigger, maybe even bold it. But
- 2:49:18overall, that's about it. All the
- 2:49:19specializations we can do with that card
- 2:49:21visual. But I actually have another
- 2:49:24visual that I would recommend instead of
- 2:49:26this one.
- 2:49:29And that brings us to our next visual,
- 2:49:32which instead of this card right here,
- 2:49:34we're going to use this card parenthesis
- 2:49:36new. So this one actually has multiple
- 2:49:38different fields within it. We're just
- 2:49:40going to focus on the data field right
- 2:49:42now to compare what these two look like.
- 2:49:44I'm going to drag in that salary year
- 2:49:46average into there. Make it into the
- 2:49:48median value and then call it median
- 2:49:51yearly salary. Now, I prefer this
- 2:49:54visual, this card new over the other one
- 2:49:56because the title is up at the top and
- 2:50:01in my mind you're it's more intuitive to
- 2:50:03the end user for them to actually view.
- 2:50:06Now, I don't like that it centers it to
- 2:50:08the left. So, under format your visual
- 2:50:10for this card, I can go into callout
- 2:50:13value, go down to the values, I can
- 2:50:15change this to center, and then I can
- 2:50:17even bump up the size if I wanted to to
- 2:50:19match 50. And then for the label itself,
- 2:50:22I could bump this one up too. Make it
- 2:50:24bold to make it a little bit more
- 2:50:25readable. Now, I'm also not necessarily
- 2:50:28a fan of how it's drawn a border around
- 2:50:30this one and not this one. If I wanted
- 2:50:32to, once again, if I need to search for
- 2:50:34something, I go into search, type in
- 2:50:36borders, make it a lot easier. or let's
- 2:50:38just try border. Scroll on down. I can
- 2:50:40say here for header or sorry for the
- 2:50:42card section I can turn off that border.
- 2:50:44Now you be the judge for it. Which one
- 2:50:46do you prefer of these? Now building
- 2:50:48single cards is not the only capability
- 2:50:51of this. We can actually do multiple
- 2:50:53cards with this card new. I'm actually
- 2:50:55going to slide this up here and we're
- 2:50:57going to insert in a new card visual
- 2:50:59underneath it to demonstrate this. So
- 2:51:01inside the data field of this the field
- 2:51:04well I can drag in something like salary
- 2:51:05year average put in like we did median
- 2:51:08but we can stick multiple values in
- 2:51:10here. So I can also stick that of hourly
- 2:51:12in here aggregating by median and it's
- 2:51:15in one single card. I'm not a fan how
- 2:51:18it's centering it. So I'm going to go in
- 2:51:20here into call out values and change it
- 2:51:22to center. Okay. But that's not the only
- 2:51:24thing with this. Right. We got this data
- 2:51:26field. I also can do categories with
- 2:51:29this. Specifically, I can drag job title
- 2:51:31short into here. And it's showing me for
- 2:51:34each of the different job titles. I can
- 2:51:36scroll down to see more. I can see this
- 2:51:39all. So, if I wanted to, I could sorry,
- 2:51:40I could put this over here. Expand this
- 2:51:42all the way up. Oh, only three are
- 2:51:44showing. Why is that? If I want to
- 2:51:46adjust this, I would go into format
- 2:51:48visual visual under layouts, I find that
- 2:51:51under in the layout, if I change this to
- 2:51:53something like grid, I can get a little
- 2:51:56bit more. We're adjusting this to a max
- 2:51:57R of two and column shown of one, but
- 2:52:00still kind of unreadable. It's too much
- 2:52:02data. We're just actually going to go
- 2:52:04back to what it was previously. And I'm
- 2:52:06going to go stick in that corner down
- 2:52:07there. Anyway, this is my preferred
- 2:52:09visual out of every visual we're going
- 2:52:10to show here today. Mainly because of
- 2:52:13what we demonstrated above to get that
- 2:52:14title above what the callout value is.
- 2:52:20Next up is this gauge card and it can be
- 2:52:24used in certain situations specifically
- 2:52:27for us for this yearly salary. We can
- 2:52:30use it in a manner to show what is the
- 2:52:33median salary but also what's the
- 2:52:35minimum what's the maximum that 920,000
- 2:52:38and then what is this average or target
- 2:52:40value. So inside of our canvas I'm going
- 2:52:43to insert this gauge card. I'm going to
- 2:52:46put in this top quadrant right here.
- 2:52:48Now, for the value itself, I'm going to
- 2:52:50go ahead and expand this into focus
- 2:52:51mode. For the value itself, we're going
- 2:52:53to put in that salary year average. And
- 2:52:57remember, we want that to be a median
- 2:52:59value. Automatically with this gauge
- 2:53:01card, whenever they put in this median
- 2:53:03value, it automatically puts the minimum
- 2:53:04or the the minimum as zero and the
- 2:53:07maximum as double that. So, where the
- 2:53:09gauge goes in the middle. Anyway, we can
- 2:53:10set the minimum and maximum values by
- 2:53:13dragging these over into here,
- 2:53:15specifying, hey, we want the minimum for
- 2:53:18this. And now we can see, hey, the
- 2:53:19minimum is 15,000. Similarly, I can drag
- 2:53:22this into the maximum value. And we can
- 2:53:24make that well the maximum. And then
- 2:53:26they also have this target value. We
- 2:53:29don't really have a target per se, but
- 2:53:30you could put in our case, I'm going to
- 2:53:32drag the salary average in there. And
- 2:53:34we'll just put in the average in there.
- 2:53:36Now, this does have a tool tip come up.
- 2:53:38So, it's behoo of you to go through and
- 2:53:40actually put in what is the actual names
- 2:53:43for these. And so, we can see that the
- 2:53:46median salary is 113,000. Average salary
- 2:53:48is 120,000. Let's go back to our report,
- 2:53:51see how I've viewed from this. Not too
- 2:53:53bad. Like usual, let's actually update
- 2:53:55that title. So, we're going to change
- 2:53:57that to median yearly salary. I'm also
- 2:53:59going to bump the font up and center it.
- 2:54:01We can also change the font of other
- 2:54:04things like these data labels which are
- 2:54:05the min and max values. I could bump it
- 2:54:07up to something like 20. For that
- 2:54:09average value, I could go to that target
- 2:54:11label, make this also 20. Also take off
- 2:54:13the decimal places off that. I don't
- 2:54:15want that on there. And then finally for
- 2:54:17the callout value itself, I can adjust
- 2:54:19things like the font if I wanted to make
- 2:54:21it bold. And that's about it. That will
- 2:54:23move with it. Fortunately, you can't, or
- 2:54:25at least underneath here, I can't
- 2:54:26control the size of this callout value.
- 2:54:31Next up is a multi-row card. And like
- 2:54:34the name implies, it has multiple rows.
- 2:54:37To make things easier on ourselves, I'm
- 2:54:38going to take that card new, do a
- 2:54:40control crl +v, and then with this
- 2:54:43selected, I'm going to then change this
- 2:54:46into this one of this multi-row card.
- 2:54:49All right. In our case where we had
- 2:54:50those 10 different job titles and using
- 2:54:53in that card new I think this multi-ro
- 2:54:55card going into this focus mode it's a
- 2:54:58lot more readable and a lot more
- 2:55:00userfriendly and intuitive. I could even
- 2:55:02drag in if I wanted to something like
- 2:55:04job title short and we can get an
- 2:55:06aggregation of it specifically of count.
- 2:55:09As usual you want to go through and
- 2:55:11clean up all the field names to make it
- 2:55:12a lot more presentable. But overall
- 2:55:14pretty happy with this.
- 2:55:18The last card to talk about is a KPI
- 2:55:21card. There's a lot going on here, but
- 2:55:22the main purpose of this is to show a
- 2:55:25callout value, if you will, and then
- 2:55:27from there, some sort of trend that's
- 2:55:29going on in the background. If you're at
- 2:55:32or above your goal for whatever you're
- 2:55:34doing, whether it's sales or returns or
- 2:55:37whatever it may be, it's going to be
- 2:55:38green. If it's below, it's going to be
- 2:55:40red. Hopefully, it goes without saying.
- 2:55:41You could change the colors if you want
- 2:55:43to. Anyway, let's build this bad boy.
- 2:55:44I'm gonna take this visual right here.
- 2:55:46Here, I'm going to copy it and then
- 2:55:47paste it. We're running out of room on
- 2:55:49here, so I'm going to just slide some
- 2:55:50stuff around. With this new card
- 2:55:52selected and down at the bottom, I'm
- 2:55:54going to now change this into a KPI
- 2:55:56card. And it's not going to show
- 2:55:57anything. It says, hey, fields for both
- 2:55:59value and trend axis are needed. So, for
- 2:56:02the trend axis, what we want to look at
- 2:56:05over time, I'm going to say we want to
- 2:56:07look at that monthly job posted date.
- 2:56:09Okay, taking this into focus mode to
- 2:56:11look a little bit more into it. So
- 2:56:12what's going in the background is it's
- 2:56:14showing how that median salary is
- 2:56:16changing over time. Right now we don't
- 2:56:19have a target. Unfortunately I don't
- 2:56:22have any data to if you will show a
- 2:56:24target for this. Like there's not
- 2:56:26another column for target salary based
- 2:56:29in that time frame or something like
- 2:56:31that. So all I can do is just throw in
- 2:56:34something like the yearly salary into
- 2:56:36there. Right now, it's doing an
- 2:56:38aggregation based on the sum, which
- 2:56:40apparently that's less than what the
- 2:56:42median is. I don't know how that's
- 2:56:44possible, but if I set it to the median
- 2:56:45itself to basically set it equal to
- 2:56:47itself, it's 0%, it equals itself. It
- 2:56:51maintains green. Once again, this is for
- 2:56:54data that maybe has you have your some
- 2:56:56sales data and then some target sales
- 2:56:58data. And then you could combine the two
- 2:57:00to combine whether you want to have this
- 2:57:02green or red value show for these
- 2:57:05values. All right, it's your turn now to
- 2:57:07go through with those practice problems
- 2:57:09to get more in depth and familiar with
- 2:57:11how to use these different cards. In the
- 2:57:13next lesson, we're going to be jumping
- 2:57:14into slicers and we're almost well, two
- 2:57:18more lessons left and we'll be done with
- 2:57:20this chapter. With that, I'll see you
- 2:57:22there.
- 2:57:26All right, two more lessons and we're
- 2:57:28going to be getting into our project. In
- 2:57:30this lesson, we're going to be covering
- 2:57:31slicers, and it's a great way to prompt
- 2:57:34your users to interact with their data
- 2:57:37in order to make selections and dive in
- 2:57:39deeper to find insights. All right, here
- 2:57:42I am inside of our final solutions file.
- 2:57:44In it, we're going to be going through
- 2:57:45all the different slicers. In no way do
- 2:57:48I ever recommend you actually make a
- 2:57:50report with this many slicers inside of
- 2:57:53a report, but this is mainly for demo so
- 2:57:56we can see all the different types that
- 2:57:58are available. We'll have a little bonus
- 2:58:00section at the end that whenever we
- 2:58:02filter down to whatever data we want,
- 2:58:04we're going to add this button to where
- 2:58:06if we want to clear all slicers, we can
- 2:58:08just click that and it'll clear it. So,
- 2:58:10little bonus.
- 2:58:13So, let's get into the three major types
- 2:58:16of slicers. I'm going to create a new
- 2:58:17page right here and call it slicers.
- 2:58:20Inside of our canvas, I'm going to go
- 2:58:21ahead and insert in a slicer. Let's go
- 2:58:25into focus mode. And for this, we're
- 2:58:27going to keep it simple. We're going to
- 2:58:28just go into the job title short
- 2:58:30portion. All right. So, this is our
- 2:58:32slicer. Right now, we can select
- 2:58:34basically one uh value at a time. Now
- 2:58:37the three major types of slicers going
- 2:58:40under format your visual under slicer
- 2:58:42settings are controlled in here right
- 2:58:45now. The style they have vertical list
- 2:58:47which is what we're seeing tile. So I
- 2:58:50could select different options like this
- 2:58:53and then the other option which I uh
- 2:58:55also really like are is the dropdown to
- 2:58:58where the user has to go in select the
- 2:59:00dropdown. They do may have to scroll,
- 2:59:02but they can select what they want
- 2:59:04inside of here and then still see that
- 2:59:06it's selected. Now, let's actually see
- 2:59:08this interact with the report. I'm going
- 2:59:10to go to our column and bar chart
- 2:59:13example that we put together or the page
- 2:59:15we put together. I'm going to copy this
- 2:59:17report and then paste it right here
- 2:59:19underneath here. And then you can see as
- 2:59:21I paste it in here, it already filter
- 2:59:23down to what I want, which actually
- 2:59:26brings up our next point. What happens
- 2:59:27if we want to quickly clear it? like
- 2:59:29yeah I can come in here and uncheck that
- 2:59:32but that's a little little burdensome.
- 2:59:35Um so instead if we have something
- 2:59:36selected like data analyst in this case
- 2:59:39if you notice whenever I'm on top of the
- 2:59:41slicer I can come up here to the top and
- 2:59:44select clear selection and then it
- 2:59:47updates with the selection clear. Now
- 2:59:49this always in is isn't intuitive to end
- 2:59:52users. So at the end of this lesson
- 2:59:54we're going over how we can create that
- 2:59:55button to clear all slicers if we want
- 2:59:57to. I'm going to do some formatting
- 2:59:59changes just to make it a little bit
- 3:00:00more visual as we go through some of
- 3:00:02these demos. I'm make this graph all the
- 3:00:04way big and make this take up this. I'm
- 3:00:06also going to change the font size. You
- 3:00:09don't need to do this unless you want
- 3:00:10to, but I'm going to make it a lot
- 3:00:11bigger so we can actually see it. All
- 3:00:13right, let's go over some functionality
- 3:00:15more on this. I'm going to transfer this
- 3:00:17back into a vertical list. Okay, the
- 3:00:20first thing is this. What happens if I
- 3:00:22want like in this case there's only 10
- 3:00:24values, but imagine if there's a 100
- 3:00:25values and I need to search through it.
- 3:00:27How am I going to be able to do that?
- 3:00:29Well, I can click the ellipses up here
- 3:00:31and select search. And this now enables
- 3:00:34search within here. So, I could search
- 3:00:36for something like, hey, which ones
- 3:00:37contain the word data? And all of them
- 3:00:40pop up. The next thing is what if I want
- 3:00:42to select multiple values? So, in this
- 3:00:44case, I have data analyst, b business
- 3:00:46anal like I can't select multiple
- 3:00:48values. What am I supposed to do here?
- 3:00:49Well, if we go under format your visual
- 3:00:51visuals and then slicer settings under
- 3:00:54selection, we can see that by default
- 3:00:58multi- select with control or command is
- 3:01:02enabled right now. So if the user wants
- 3:01:05to input multiple values in this, they
- 3:01:07have to hold control and then select all
- 3:01:10the multiple different values. Kind of
- 3:01:13annoying if you ask me. Now let's say
- 3:01:15you only want them to select one value
- 3:01:18at a time. Well, you can turn this
- 3:01:20single select on and then it turns into
- 3:01:22radio buttons which prompts them that
- 3:01:24hey, you can only do one value at a
- 3:01:25time. In this case with job titles,
- 3:01:27that's not necessarily applicable. So,
- 3:01:28I'm going to turn that off. And then the
- 3:01:30other one I am going to enable that's
- 3:01:32not enabled by default that you should
- 3:01:34turn on typically is show select all.
- 3:01:37And this is a fast way for them besides
- 3:01:40using that clear slicer to just hey,
- 3:01:42select all to get back to where they
- 3:01:45need to get to. For the time being, I'm
- 3:01:47going to switch this up and we're going
- 3:01:49to just change this into tile. And it
- 3:01:52works in the same way. I can select
- 3:01:53multiple values by holding control and
- 3:01:56then going through and clicking on the
- 3:01:57buttons.
- 3:02:00Now, for categories, these are the three
- 3:02:03major types, vertical list, tile, and
- 3:02:05drop down. But there's actually other
- 3:02:07types of slicers. Let's find out how we
- 3:02:09can make those. So, I'm going to come in
- 3:02:11and create a new slicer. And I could
- 3:02:13drag in a number column or in this case
- 3:02:15I'm going to drag in a date column. Now
- 3:02:18for this one it's using what we call a
- 3:02:20between slicer. I know this I can go
- 3:02:22into format your visual slicer settings.
- 3:02:24And now when I do this drop down there's
- 3:02:27a lot more different options in here.
- 3:02:29You can do between um between meaning I
- 3:02:32can slide this and move it anywhere
- 3:02:34between. We can see that the data did
- 3:02:36update during that time. I could do
- 3:02:38before where only on one side it's
- 3:02:41allowed me to move. after on the other
- 3:02:43side allowed me to move drop down as we
- 3:02:46saw before not no change here for that
- 3:02:49they do have this one on relative date
- 3:02:50or relative time this one I can't really
- 3:02:53even see this this allows you to filter
- 3:02:55based on something like oh the last one
- 3:02:59if we wanted to last one years and then
- 3:03:02we can't see anything actually let's go
- 3:03:03back to the report oh it's not working
- 3:03:06this is actually known issue let me show
- 3:03:09you what I mean I'm going to actually
- 3:03:10switch this back to between. I'm going
- 3:03:12to go and clear the selection so that
- 3:03:14way this and I actually had to drag this
- 3:03:16end date down to get it to work after
- 3:03:18switching it to between. Anyway, this is
- 3:03:21a known issue with PowerBI. As you see,
- 3:03:25whenever I drag that start date back and
- 3:03:27forward, it's causing the filters or
- 3:03:31causing the other visuals to end up
- 3:03:33breaking. And so, what I have to do is I
- 3:03:36have to basically clear selection and
- 3:03:39then it gets back to working. Anyway,
- 3:03:41this is a bug. Somebody on Reddit
- 3:03:43reported this a month ago, filming this
- 3:03:46in May of 2025. So maybe by the time
- 3:03:50you're filming this or sorry, you're
- 3:03:52actually going through this, you won't
- 3:03:55have this error coming up. But just know
- 3:03:57that Microsoft is aware of this issue
- 3:03:59and they're trying to troubleshoot to
- 3:04:01fix this. So anytime you enter this
- 3:04:04error error by just like filtering by
- 3:04:06start date, you can just clear the
- 3:04:08selection. Right now, I'm going to
- 3:04:10recommend we don't use any between
- 3:04:12filters because of this. Specifically
- 3:04:13for any dashboards that we're trying to
- 3:04:15build. Hey, we can also do one other
- 3:04:17thing with this specifically. We're not
- 3:04:19limited to just dates. If I wanted to, I
- 3:04:23could take something like the salary
- 3:04:25data and stick it into the field. I'm
- 3:04:28going to get rid of this and then change
- 3:04:30this visual or the slicer setting back
- 3:04:32to between. But now I could adjust what
- 3:04:35salary range I want to look at for this.
- 3:04:38Now, for all of these slicers, I do
- 3:04:41recommend updating the title to make it
- 3:04:44more intuitive of what's going on here.
- 3:04:46You can adjust it underneath the slicer
- 3:04:49header, but I'm going to recommend just
- 3:04:51going into the field and changing it to
- 3:04:53an intuitive title like this one's of
- 3:04:55filter salary range. Our top title one
- 3:04:58now is select job title. And then update
- 3:05:01this one to something like filter
- 3:05:02posting date.
- 3:05:05So, what happens if we want to use
- 3:05:07slicers on multiple different pages?
- 3:05:10Well, we do have an an option to sync
- 3:05:13slicer. So, in this case, I'm going to
- 3:05:14take this tile slicer that we have right
- 3:05:16here and copy it. And then we're going
- 3:05:18to go to the column and bar page. I'm
- 3:05:20going to paste this bad boy into here.
- 3:05:22And it's going to say this. Hey, do you
- 3:05:24want to sync slicers or sync visuals?
- 3:05:27One or more of these copy visuals can
- 3:05:28stay in sync with the visual is copied
- 3:05:30from. Do you want to keep them in sync?
- 3:05:32In most all cases, I do want to do this.
- 3:05:35Now, if you remember back to our column
- 3:05:37and bar lesson, we did a filter on this
- 3:05:41page for job title short for all job
- 3:05:44titles that contain the word data. So,
- 3:05:46in this case, there's only six values
- 3:05:48here. Seven if you include se select
- 3:05:50all. Anyway, if I make a selection like
- 3:05:53in this case, I'm going hold control and
- 3:05:54do data analyst, data engineer, and data
- 3:05:56scientist. All three selected. And then
- 3:05:59when I go back to the slicers page,
- 3:06:01these are also selected here. Now, what
- 3:06:04if I want to unsync it or customize the
- 3:06:07syncing behavior more? Well, in the
- 3:06:09ribbon, if we navigate to the view tab
- 3:06:11and we go to sync slicers, I'm going to
- 3:06:14close out of data. And also in
- 3:06:15visualizations, we have a sync slicers
- 3:06:18popup. I'm going to select the slicer
- 3:06:20that I want to investigate further. And
- 3:06:23it provides a list of all the different
- 3:06:25pages we have. So column and bar all the
- 3:06:28way to slicers. This first column right
- 3:06:31here indicates whether the slicer is
- 3:06:34synced between the other page. And then
- 3:06:36this other one indicates whether it's
- 3:06:38visible or not. So on this slicer page I
- 3:06:41could make this unvisible or invisible
- 3:06:44and uh take it away. Typically I would
- 3:06:47just delete it. Anyway, you could we
- 3:06:50could also unsync it. So if I wanted to
- 3:06:52unsync these slicers I could unsink
- 3:06:54unsync it here. And now on this page,
- 3:06:57I'm going to select senior roles and
- 3:06:59remove these. However, when I navigate
- 3:07:01back to column and bar, the data is
- 3:07:05still filtered for data engineer, data
- 3:07:07scientist, data analyst. However, it's
- 3:07:10filtered down and our slicer is missing.
- 3:07:12This is actually sort of weird behavior,
- 3:07:14but if we go into view and I go into
- 3:07:18selection to show this up, we can see
- 3:07:21all the different visuals in here,
- 3:07:23right? You know, you can do the hide if
- 3:07:25you want to or not. The slicer became
- 3:07:27hidden because we basically unhid it.
- 3:07:30Anyway, we have those three values right
- 3:07:32here. I'm going to go ahead. I don't
- 3:07:33want this slicer on this page anyway, so
- 3:07:35we're going to go ahead and just delete
- 3:07:36it anyway. But now we understand how we
- 3:07:38can sync slicers between different
- 3:07:42pages. In almost all situations, like I
- 3:07:44said, I'm going to sync slice between
- 3:07:46pages to make it that much easier for
- 3:07:49the enduser to navigate between pages
- 3:07:52and have their current selections
- 3:07:54maintained as they go throughout.
- 3:07:59Last thing to talk about is the clear
- 3:08:01all slicers button. Like I mentioned
- 3:08:03previously, this isn't necessarily of
- 3:08:06clear selections of the top of the drop
- 3:08:08down. It's not necessarily super
- 3:08:10intuitive for users to click to clear
- 3:08:14their slicers. So, open the ribbon under
- 3:08:16insert. I'm going to go to buttons and
- 3:08:18we're going to insert a button of clear
- 3:08:20all slicers. Let's make room for this up
- 3:08:23at the top. Going to drag that right
- 3:08:25into the center right here. So now, so
- 3:08:27let's say I go through and make some
- 3:08:29different selections and filter also for
- 3:08:32a certain date. Whenever I want to clear
- 3:08:34this, I can just come up to clear all
- 3:08:35slicers, press control, and click it. If
- 3:08:38I want to dress this button up a little
- 3:08:40bit and go under the format buttons
- 3:08:41under style, make the font a little bit
- 3:08:44bigger, make it bold, go down to fill,
- 3:08:47turn it on, change it to this blue
- 3:08:49color, and then maybe put something like
- 3:08:51a shadow underneath it to make it stand
- 3:08:53out a little bit more. Also, not really
- 3:08:55a fan of rectangles. So, underneath
- 3:08:58shape in here, I can come under this and
- 3:09:01I can just change this to round
- 3:09:02rectangle. All right, good enough. Now,
- 3:09:04there's one other button I want to call
- 3:09:06your attention to that you can add to
- 3:09:08this. I'm going to go under the optimize
- 3:09:10tab on the ribbon, and it's an apply all
- 3:09:14slicers button. And I'm going to drag
- 3:09:16that over here for the time being and
- 3:09:18drag this over. Let's first demo it, and
- 3:09:20then I'll explain it. I'm going to make
- 3:09:22multiple different selections. So, data
- 3:09:24analyst, also data engineers, and then
- 3:09:27data scientist. You notice the button
- 3:09:29went from that light gray to a dark
- 3:09:31gray. I'll also change the date also
- 3:09:35during this which I didn't call out none
- 3:09:36of the data updated. So now I can click
- 3:09:41controllclick this and now the data will
- 3:09:44update. Now why would you want to do
- 3:09:46this? So I cleared all slicers. If I go
- 3:09:48through and just actually select all the
- 3:09:50items as it's filtering. Actually I have
- 3:09:54to get rid of this button to actually
- 3:09:55demo that. I'm going to go ahead and
- 3:09:57remove it. Yeah, this will change the uh
- 3:09:59slicer behavior, but mainly I want to
- 3:10:02just demonstrate whenever I'm clicking
- 3:10:03this, the data is updating pretty dang
- 3:10:06quickly. So something like that of
- 3:10:10underneath the optimize tab of this
- 3:10:11apply all slicers button in this case
- 3:10:14based on how small the data set is, not
- 3:10:17really useful and probably going to
- 3:10:18cause more confusion for the end user.
- 3:10:21This type of button would be used in
- 3:10:22cases where there's a very large data
- 3:10:25set and it's taking a long time for the
- 3:10:27data to refresh. And so instead, I'd
- 3:10:29allow them to select all what they
- 3:10:31wanted to do and then apply the update
- 3:10:34to all the visuals. So if you have this
- 3:10:35on there of this apply all slicers, go
- 3:10:37ahead and remove it. We're not going to
- 3:10:39use it and going to go ahead and clear
- 3:10:41all slicers as well. All right. So you
- 3:10:43have some practice problems and now go
- 3:10:44through and get more familiar with using
- 3:10:46all these different slicers and also
- 3:10:48some practice with buttons. In the next
- 3:10:50lesson, which conveniently we just had a
- 3:10:52intro to buttons, we go further in
- 3:10:54detail on buttons and also bookmarks. So
- 3:10:57with that, I'll see you there.
- 3:11:03Welcome to this last lesson this chapter
- 3:11:05on buttons and bookmarks. And I may be a
- 3:11:08little biased, but this is by far my
- 3:11:10favorite section because we're going to
- 3:11:12have a lot more fun with PowerBI. Now,
- 3:11:14in our solutions notebook, let me show
- 3:11:15you what I mean. So, in the first half,
- 3:11:17we're going to be covering buttons.
- 3:11:18Buttons aren't really that difficult,
- 3:11:20and you've made some already. In this
- 3:11:22case, I want to go to a certain lesson
- 3:11:24in here. I can navigate with the witch
- 3:11:27chart, and it navigates me to that page,
- 3:11:29and then I can navigate back. All this
- 3:11:31was configured with buttons. We're going
- 3:11:33to build something similar to this for
- 3:11:36the first half of this lesson. Now, for
- 3:11:38the second half, we're going to move on
- 3:11:40to a more complex topic of bookmarks.
- 3:11:43Anyway, let me show you what bookmarks
- 3:11:44can do. Here we are on our page of
- 3:11:47column and bar charts. And I have this
- 3:11:50button up at the top for a bookmark. And
- 3:11:52whenever I click controllclick onto the
- 3:11:54button, I have appearing on top of our
- 3:11:58visuals a slicer that allows us to
- 3:12:01navigate down to whatever data I want.
- 3:12:03So I'll make a few selections. And then
- 3:12:05once I'm done making those selections, I
- 3:12:07can go ahead and click this button to
- 3:12:08close it off. And it's filtered down.
- 3:12:11Anyway, revealing the magic behind the
- 3:12:13scenes. Going to the view tab under
- 3:12:14bookmarks. I can see that this is
- 3:12:16controlled via bookmarks, specifically
- 3:12:20this bookmark here. and this bookmark
- 3:12:22here, which we're going to be building
- 3:12:24during this lesson. And these bookmarks
- 3:12:26are just placed inside of the action for
- 3:12:29the button themselves. Okay. Anyway, I'm
- 3:12:31getting ahead of myself. Let's actually
- 3:12:32get into buttons.
- 3:12:36Like I mentioned, we're going to be
- 3:12:37building a page like this. So, inside of
- 3:12:40our PowerBI report that we're on, we
- 3:12:42need to first create a new page for this
- 3:12:45homepage. I'm going to go ahead and name
- 3:12:47it home. And then I'm going to
- 3:12:48rightclick it. Instead of trying to drag
- 3:12:50it over, I'm going go to move to and I'm
- 3:12:52going to move to front. Inside of this
- 3:12:53blank pan canvas, I'm going to insert a
- 3:12:56title. We can do this by going to the
- 3:12:57insert tab and just inserting a text
- 3:12:59box. And then in my case, I'm just going
- 3:13:01to format say chapter 2 visualizations
- 3:13:03real original. All right, let's build
- 3:13:05those buttons for the different pages.
- 3:13:06This one's actually really simple.
- 3:13:08Underneath buttons, I'm going to go to
- 3:13:10navigator and then page navigator. These
- 3:13:13buttons then pop up. I'm going to move
- 3:13:15them and recenter it. We're going to
- 3:13:16format it here in a little bit, but just
- 3:13:18want to demonstrate how it is working
- 3:13:20right now. Right, home is we're on home,
- 3:13:22so it's automatically black. And then
- 3:13:24column bar. If I want to go to that, I'm
- 3:13:26going to click control. And then I'm
- 3:13:27going to be able to navigate to it. So,
- 3:13:30let's format it by ensuring we're
- 3:13:31selected on it. Go into the format
- 3:13:33navigator and under shape. You know, I
- 3:13:35don't like rectangles. I like rounded
- 3:13:36rectangles. Next, I'm going to go into
- 3:13:38the grid layout to adjust how it's done.
- 3:13:41And we're going to change this from
- 3:13:43horizontal to grid. And from this we can
- 3:13:46specify how many rows and how many
- 3:13:48columns. For this we're going to say
- 3:13:50three rows and three columns. Now
- 3:13:52navigating underneath style I'm going to
- 3:13:54change the font size to a little bit
- 3:13:55bigger. Make it bold. And if you notice
- 3:13:58it only changed these buttons. It didn't
- 3:14:00change our home one. And that's because
- 3:14:02that's the selected one. So we can also
- 3:14:05change this one to 20. Anyway, going
- 3:14:07back to those that are default. We can
- 3:14:10then go into under fill. And you know I
- 3:14:13love me some light blue. So, we'll stick
- 3:14:15with that. And then we'll also enable
- 3:14:17the shadow to make it look a little more
- 3:14:19poppy to entice people to press the
- 3:14:20buttons. All right, this is good enough.
- 3:14:23Now, as you remember, if we clicked on
- 3:14:25something like press control and go to
- 3:14:26column bar. Yeah, we're on column bar,
- 3:14:28but how the heck do we get back to the
- 3:14:30homepage? Well, we can add a button for
- 3:14:32this. Now, inside of the projects folder
- 3:14:36under resources and then under images,
- 3:14:39we actually have an image in there of a
- 3:14:42home icon emoji. We're going to use this
- 3:14:45for our button. So, underneath the
- 3:14:47insert ribbon, I'm going to go to image.
- 3:14:49We're going to navigate to that projects
- 3:14:51folder, resources, images, and then
- 3:14:53select the home emoji. From there, I'm
- 3:14:55going to slide it up into the right hand
- 3:14:58corner to make sure it's not blocking
- 3:14:59anything. All right. Right now, this is
- 3:15:01just an image. There's nothing happening
- 3:15:03with it. It doesn't do any actions when
- 3:15:04I uh click control. We notice we have
- 3:15:06format image popup and we have action.
- 3:15:09And right now, it's off. So, obviously,
- 3:15:10we want the action to be on. Now we can
- 3:15:13assign different actions. We could
- 3:15:15assign book a bookmark which we'll be
- 3:15:17doing later. Could assign page
- 3:15:19navigation which probably what we want
- 3:15:21to do but they also have other features
- 3:15:23to do as well. We're going to just stick
- 3:15:24with page navigation. For this we need
- 3:15:26to specify the destination and we want
- 3:15:29to go home. I always want to go home. So
- 3:15:32now with this if I go ahead and click
- 3:15:34control and then on the home button it
- 3:15:36navigates me here and I can navigate
- 3:15:38back here. All right. Easy way. Let's go
- 3:15:40ahead and just copy this. Press Ctrl + C
- 3:15:42and then I'm going to just navigate into
- 3:15:44every single page and paste it into
- 3:15:46there pressing commandV or controlV. All
- 3:15:49right, I navigated to the last page.
- 3:15:51Let's go back home. And with this,
- 3:15:54remember we have to press control plus
- 3:15:56the click. Some of our users that are
- 3:15:58new to this may not know they need to
- 3:16:00press control. So, we could use what's
- 3:16:02called a Q&A feature or Q&A button to
- 3:16:05prompt them to do this. So, under the
- 3:16:07insert tab, I'm going to go to buttons
- 3:16:10and we're going to go to this one on
- 3:16:13help. I'm going to stick it up in the
- 3:16:14right hand corner. And this is pretty
- 3:16:17generic and understanding that users
- 3:16:19probably need to go here if they have
- 3:16:21help. Now, clicking this button, I'm
- 3:16:23going to go into actions itself. I want
- 3:16:25to turn on these actions. And the type
- 3:16:27of action I want to do for this is a
- 3:16:31Q&A.
- 3:16:32Then I'm going to navigate here to under
- 3:16:35tool tip. the tool tip is on. And for
- 3:16:37the tool tip or the answer to the
- 3:16:39question, if you will, I'll say press
- 3:16:41control while clicking a button to
- 3:16:43select. So now whenever I'm on this
- 3:16:46page, if I just scroll over this, this
- 3:16:48popup comes up says press control while
- 3:16:50clicking a button to select. And they
- 3:16:52don't even have to actually select the
- 3:16:54button. Sorry, got a little bit
- 3:16:56confused. Whenever I click control and
- 3:16:58actually click this button, it pops up
- 3:16:59Q&A is not what I want. I don't want
- 3:17:01Remember, we went over Q&A feature. The
- 3:17:03thing's horrendous. Instead, what we
- 3:17:05want for the action for this button is
- 3:17:07we want it to just bookmark and the
- 3:17:09bookmark to be none. So, if they were to
- 3:17:12actually control-click this, nothing's
- 3:17:14actually going to happen, but they have
- 3:17:15the tool tip pop up. Got a little
- 3:17:17confused there. And that's a great segue
- 3:17:18into our next section on bookmarks
- 3:17:20because now we can see that we could set
- 3:17:23a bookmark as an action to a button.
- 3:17:29So, let's get into making our first
- 3:17:31bookmark. What we need to do is go to
- 3:17:33view tab on the ribbon, select bookmarks
- 3:17:35to pop it up. In it, the instructions
- 3:17:38are pretty simple. It says filter data
- 3:17:40to get to the state you want to capture
- 3:17:42and then click add. So, let's first just
- 3:17:45capture this state right here that we're
- 3:17:48in to demonstrate what's going on here.
- 3:17:50So, I'll click add. And nothing special
- 3:17:54just pops up here. Now, let's say we
- 3:17:56want a filtered state. Say I wanted to
- 3:17:59select in this case data engineer, data
- 3:18:02scientist and data analyst. By the way,
- 3:18:04I'm holding control for all those. And I
- 3:18:07want to bookmark this view. Well, then I
- 3:18:10would go ahead and click add. Okay,
- 3:18:13remember previously bookmark one is the
- 3:18:15unfiltered one. So if I were to click
- 3:18:17it, it's going to go to that. And if I
- 3:18:19go to this one, it's going to go to
- 3:18:20that. Now these names are generic. So
- 3:18:22we're going to name them real quick to
- 3:18:23column and bar unfiltered and then
- 3:18:25column bar filtered. Like I said before,
- 3:18:28we could go in, insert a button. In this
- 3:18:30case, I'll just insert, we'll say a
- 3:18:32blank button and make it nice and big,
- 3:18:36and of course, change the fill to a
- 3:18:38light blue color. We're going to end up
- 3:18:39deleting this button, so you don't need
- 3:18:40to necessarily use this. Anyway, in the
- 3:18:42action, I can turn it on. Go into here,
- 3:18:45turn on bookmark, and set this bookmark
- 3:18:48to something like filtered. So now,
- 3:18:51whenever I click this, pressing
- 3:18:53controllclick, it's going to filter my
- 3:18:55data. Um, but if I could click it again,
- 3:18:57it's not going to unfilter it. I'd have
- 3:18:58to create another button for unfiltered.
- 3:19:01Anyway, that's for demos only. We're
- 3:19:02going to go ahead and just delete this
- 3:19:04button. Now, diving into this bookmark a
- 3:19:06little bit further. Going to the filter,
- 3:19:09going to the three dots associated with
- 3:19:11this. We can see for the popup up at the
- 3:19:13top, they have options like update,
- 3:19:15rename, delete. You could also g group
- 3:19:17bookmarks if you want. We're not going
- 3:19:18to do that. The key things down here are
- 3:19:21we have these attributes selected. These
- 3:19:24are the bookmark properties on whether
- 3:19:26it's going to save things related to the
- 3:19:28data display or if it was related to the
- 3:19:32current page. So let's demo why this is
- 3:19:34important. Going back and selecting this
- 3:19:36for column and bar charts filtered. If I
- 3:19:38were to select this one and then
- 3:19:41unselect data. So it's no longer
- 3:19:44selected. And then from there click
- 3:19:47update because it's updating this
- 3:19:49bookmark. Now when I go to unfiltered
- 3:19:51it's going to unfilter. And then when I
- 3:19:53go to filtered, it's not going to
- 3:19:55actually filter the data anymore because
- 3:19:58we have data unchecked. So let's
- 3:20:00actually put that back where it needs to
- 3:20:01be. We'll select data engineer, data
- 3:20:03scientist, data analyst. We'll change
- 3:20:05this to data and then also click update.
- 3:20:07Now navigating between the two, they
- 3:20:09work just fine. All right. Next up, what
- 3:20:11do we mean by display? Well, display
- 3:20:14deals with what visuals are shown or not
- 3:20:18shown. Let's unfilter this data. Let's
- 3:20:20say I wanted to insert in a slicer. So,
- 3:20:24I'm going to put this bad boy right
- 3:20:26here. I'm going to drag in the job title
- 3:20:28short column for it. Right now, we're
- 3:20:30going to change the settings and we're
- 3:20:31going to make it into tile. I'm going
- 3:20:33make it a little bit bigger. Also, let's
- 3:20:34close out of this data pane.
- 3:20:35Everything's getting sort of small.
- 3:20:37Anyway, as expected, right, I could use
- 3:20:39this and holding control, I could select
- 3:20:40multiple different options that I want.
- 3:20:42But what happens if I wanted to use a
- 3:20:44bookmark to control whether something
- 3:20:47like this visual uh is visible or not?
- 3:20:50So let's first record a bookmark with
- 3:20:53this slicer available. I'll go ahead and
- 3:20:54click add and then call this column and
- 3:20:57bar slicer. Okay, so now this one's
- 3:20:59activated. And now I want to bookmark
- 3:21:01where it's not visible. Well, I'm going
- 3:21:04to go into the view ribbon and go to
- 3:21:07selection. Also going to close down on
- 3:21:10visualizations. Got too many panes over
- 3:21:11here. Anyway, if you remember, we went
- 3:21:13over selection pane previously. We can
- 3:21:15hide or display certain options. So,
- 3:21:19what I'm going to do is I'm going to go
- 3:21:20ahead and hide it. And now, let's add
- 3:21:24another bookmark and call this column
- 3:21:26and bar no slicer. So, now with the
- 3:21:29bookmark, I can toggle between being a
- 3:21:31slicer and no slicer. Now, visually,
- 3:21:34this is actually I don't really like
- 3:21:35this how this is done visually. So, I'm
- 3:21:37going to just show a quick little trick
- 3:21:38how we can fix this. Going to insert.
- 3:21:40I'm going to insert in a shape,
- 3:21:42specifically a rectangle. Make this bad
- 3:21:45boy take up the entire view. Put this
- 3:21:47underneath the slicer. So, the slicer is
- 3:21:49on top of it. And then for format shape,
- 3:21:52we're going to go into the style, change
- 3:21:53this to the color of black, and then
- 3:21:56change the transparency to something
- 3:21:58like 75%. Okay. So, it looks like, hey,
- 3:22:01it's popping out in front. I can insert
- 3:22:03another shape behind it. Putting it
- 3:22:05behind the slicer itself. And for this
- 3:22:07one, I'm going to change the color to
- 3:22:10just white. This one will leave
- 3:22:12transparency at zero. All right. So now
- 3:22:14for our bookmark for the slicer, I want
- 3:22:17to update what it looks like. So I'm
- 3:22:19going to click it and click update. Now
- 3:22:22when I navigate between no slicer and
- 3:22:25slicer, that didn't work.
- 3:22:29That didn't work because for no slicer,
- 3:22:31I actually need to update this one as
- 3:22:34well to remove this shape and this
- 3:22:36shape. So, we'll update this one as
- 3:22:38well. Now, slicer, no slicer. Now, let's
- 3:22:43add buttons to activate this. So, under
- 3:22:46insert tab, under buttons, I'm just
- 3:22:48going to use this one here on bookmarks.
- 3:22:49I made it slightly bigger. And then in
- 3:22:52it, we're going to navigate to the
- 3:22:53format button. And under action, I'm
- 3:22:56going to change this bookmark to
- 3:22:58activate the slicer. So now whenever I
- 3:23:01click this, it activates the slicer, but
- 3:23:04the button's still there. I actually
- 3:23:06want the button to disappear because we
- 3:23:08need to stick another button in that
- 3:23:10place to make the slicer disappear.
- 3:23:13So with this, I'm going to hide this
- 3:23:16button. And once again, I need to update
- 3:23:19this slicer view. So I click three dots,
- 3:23:21clicked update. Now, navigating back
- 3:23:24between the two, testing it out. Click
- 3:23:26the button. The button disappears. Okay.
- 3:23:28So, now let's add a button on here. For
- 3:23:31this, we're just going to keep it
- 3:23:32simple. We're going to add this back
- 3:23:33arrow. And we'll go into formatting that
- 3:23:36button. The action specifically, I want
- 3:23:38it to go to a bookmark. And we want to
- 3:23:40go to column and bar. No slicer. Now,
- 3:23:43testing this button out. I'm going to
- 3:23:44click it. And both buttons are
- 3:23:46appearing. Uh that means we need to on
- 3:23:49this visual hide the back arrow button
- 3:23:53and thus update this no slicer to make
- 3:23:56sure that includes it. Okay, this should
- 3:23:58be the final tweak for this. Yep, now I
- 3:24:01can use these buttons to navigate back
- 3:24:02and forth and I don't have to go to this
- 3:24:04bookmarks pane. Now one major thing you
- 3:24:06may have noticed with this, let's say I
- 3:24:09clicked open this and then I selected
- 3:24:11data analyst, data engineers, data
- 3:24:13scientist and then clicked back. My data
- 3:24:16resets. What the heck is going on here?
- 3:24:19Well, as we demonstrated in the
- 3:24:21unfiltered and then also the filtered
- 3:24:23example, which apparently I need to
- 3:24:26update these as well, visuals. We'll get
- 3:24:28to that. We need to adjust what is going
- 3:24:30on with the data uh metadata that's
- 3:24:33going on and being saved here.
- 3:24:35Specifically, we don't want to keep
- 3:24:37exactly this data in here. So, just to
- 3:24:39make sure I'm clear, I have no slicer
- 3:24:42selected. From there, I'm going to
- 3:24:44uncheck data and then I'm going to click
- 3:24:47update. I'm going to do the same thing
- 3:24:49now with the slicer. I'm going to
- 3:24:51uncheck data and then with that click
- 3:24:54update. So now whenever I'm working with
- 3:24:58this and I select data analyst, data
- 3:24:59engineer, data scientist and then close
- 3:25:01out of this, it stays because that no
- 3:25:05slicer bookmark is not preserving the
- 3:25:08data state. I'm going to update the
- 3:25:10filtered and unfiltered real quick. For
- 3:25:12the filtered, I want to hide basically
- 3:25:14all these different things that we had
- 3:25:16on here and then click update. For
- 3:25:19unfiltered, I want to do the same thing
- 3:25:21and then click update. Okay, this is a
- 3:25:24great way. Now we can just cycle between
- 3:25:25all these, make sure that it's working,
- 3:25:27everything's working fine. Looks like
- 3:25:30I'm sort of a silly. I didn't maintain
- 3:25:32the buttons as they needed to be.
- 3:25:34Specifically, that bookmark filter. I'm
- 3:25:36going to just update that real quick on
- 3:25:38both of these. So, as you can see by
- 3:25:40that, this can get real finicky to make
- 3:25:42sure that you want everything to work
- 3:25:44properly and everything set up just
- 3:25:46fine. So, that way there's nothing that
- 3:25:49is interfering with the other thing. So,
- 3:25:51bookmarks can get really technical.
- 3:25:54Because of that, we got some practice
- 3:25:55problems for you to now go through and
- 3:25:58test your capabilities with creating
- 3:25:59buttons and also with bookmarks. With
- 3:26:02that, we now have all the skills
- 3:26:04necessary to dive into our first
- 3:26:06project. And for that, we'll be building
- 3:26:08a data science dashboard with this data
- 3:26:10set we've been working with and a lot of
- 3:26:12the visuals we've already built. All
- 3:26:14right, with that, I'll see you in the
- 3:26:16next one.
- 3:26:20Welcome to this first of three lessons
- 3:26:23in building our first project with
- 3:26:25PowerBI. In this lesson and the next
- 3:26:28lesson, we'll be building the first and
- 3:26:30second page of our dashboard. And then
- 3:26:33in the final lesson, we'll be going
- 3:26:35through how we can share it via
- 3:26:37something like PowerBI service or even
- 3:26:40something like GitHub.
- 3:26:44So before we get into actually building
- 3:26:46this dashboard, we need to understand
- 3:26:50what are some basic or best practices to
- 3:26:53implement to create a dashboard that
- 3:26:56people are actually going to use. I can
- 3:26:58tell you from personal experience that a
- 3:26:59lot of dashboards that I built,
- 3:27:01especially my younger days, that I
- 3:27:03didn't have these type of principles in
- 3:27:06mind, I guarantee you they're not in use
- 3:27:08today because of that. And specifically,
- 3:27:11it starts and also ends with two main
- 3:27:14questions that you should always be
- 3:27:15asking yourself. What problem are we
- 3:27:18trying to solve with this dashboard? And
- 3:27:21who are we designing this dashboard for?
- 3:27:25You may think that you have the newest
- 3:27:27and greatest dashboard built, but if
- 3:27:29your end consumer, your stakeholder
- 3:27:32doesn't have the same concerns or same
- 3:27:35problems that they think are being had,
- 3:27:38they're not going to be using the
- 3:27:39dashboard. This is a great example, or
- 3:27:43actually I should say a bad example
- 3:27:45specifically how somebody built a
- 3:27:47dashboard and didn't think of those two
- 3:27:49questions. I mean, just looking at it,
- 3:27:52who is it? Who do you think this is even
- 3:27:54intended for and what problem are they
- 3:27:57trying to solve? This is a dashboard I
- 3:27:59found online and it's a dashboard that
- 3:28:01obviously deals with something around
- 3:28:04sales for a company. But even as a user
- 3:28:06myself, where should I be looking and
- 3:28:09what should I be drawing my attention
- 3:28:10to? From a design perspective, there's
- 3:28:12entirely too many colors. And for that
- 3:28:15pie chart up there or that donut chart,
- 3:28:17once again, you should never have that
- 3:28:19many values inside of there. All right,
- 3:28:21this next example, they're going to get
- 3:28:22better by the way as we go along. This
- 3:28:24example, not too bad. This dashboard is
- 3:28:27obviously being used for some
- 3:28:29stakeholders within supply chain and
- 3:28:31sales that want to monitor the
- 3:28:33performance over time and they have a
- 3:28:35specific attributes that they're looking
- 3:28:37at. From a design perspective though,
- 3:28:40I'm going to say this has once again a
- 3:28:42little bit too many colors. Mostly I'm
- 3:28:44getting drawn to those portions that are
- 3:28:46red, such as that profit, then that
- 3:28:48ranking overview at the bottom. But red
- 3:28:51doesn't mean that it's bad. It's just
- 3:28:52how they colored it. Not really a fan of
- 3:28:54it. I do however like that it is dark
- 3:28:56mode. Next up is this one on call center
- 3:28:58dashboard. And easily I can see from
- 3:29:01this this is monitoring how active a
- 3:29:04call center is and specifically what
- 3:29:06areas are most active. So this is
- 3:29:09probably made for some sort of manager
- 3:29:10within a call center to monitor
- 3:29:12performance and see if there's any
- 3:29:14irregularities. I'm liking the design
- 3:29:16aspect from this. It's very simple. They
- 3:29:19kept simple color palettes to draw your
- 3:29:21eye and attention into darker colors.
- 3:29:24Although I would argue that some of the
- 3:29:26lighter colors are a little too
- 3:29:28distracting, but overall nice little
- 3:29:30view. Oh, and it has a little dark and
- 3:29:32light mode that you can switch between.
- 3:29:34All right, last one's probably my most
- 3:29:36favorite. In this one, we can see that
- 3:29:38clearly we're monitoring some sort of
- 3:29:41web traffic. And we have the cards up at
- 3:29:43the top in order to draw our attention
- 3:29:46into the most key metrics. and then
- 3:29:49visuals underneath this in order to
- 3:29:52reinforce what's going above. I really
- 3:29:54like this type of design and I'm going
- 3:29:56to recommend it. I'm really liking these
- 3:29:58sessions and page views cuz we can see
- 3:30:00we do have some anomalies here in some
- 3:30:03portions. So, that would queue me in as
- 3:30:05a manager of this that I'd want to maybe
- 3:30:08go and investigate those areas. And why
- 3:30:10we have it's probably at the same time
- 3:30:12why we have these bounce rates and page
- 3:30:14exits during that and probably we have
- 3:30:16this large spike right here. Anyway, the
- 3:30:18simpler the better. Really love the
- 3:30:20simplicity of this.
- 3:30:24So, getting into the planning of our
- 3:30:27dashboard, we want to first start out by
- 3:30:29looking at and answering those two
- 3:30:32questions that I previously was
- 3:30:34scrutinizing. First is who are we
- 3:30:37designing this for? Specifically, we're
- 3:30:39going to design this for job seekers,
- 3:30:41job transitioners, or swappers.
- 3:30:43Basically, somebody looking for a
- 3:30:44promotion within a company. and
- 3:30:45specifically those that are working in
- 3:30:48data science because I got data on data
- 3:30:50science jobs. And what problem are we
- 3:30:52trying to solve? Well, those look for
- 3:30:55roles often struggle because information
- 3:30:57about the job market scattered
- 3:30:59everywhere. There's no single location
- 3:31:02to get an overall trend of the market,
- 3:31:05typical compensation levels, and even
- 3:31:07job quality. So that's what our
- 3:31:09dashboard is aiming to solve because we
- 3:31:11could go to something like LinkedIn,
- 3:31:13search for a job like data analyst and
- 3:31:16yeah it provides an overview of
- 3:31:18different jobs available and an amount
- 3:31:20of results but there's nothing related
- 3:31:22to trends expected pay and whatnot. So
- 3:31:25we're going to be aiming to solve this.
- 3:31:27So, anytime you're starting out, I
- 3:31:29recommend actually going and if you
- 3:31:32will, drawing out or just giving a rough
- 3:31:34sketch of what you want to accomplish
- 3:31:37with your dashboard. And if you have
- 3:31:39stakeholders available, you can show
- 3:31:41them what you're thinking and g then get
- 3:31:44direct feedback. So, make sure you're
- 3:31:46not going down a wrong avenue. for this
- 3:31:48dashboard. I did this beforehand and put
- 3:31:52together a rough sketch of some things
- 3:31:54that I'd like to have available on a
- 3:31:56dashboard for me to have access to. I've
- 3:31:59been in a position of job searching. So,
- 3:32:01I really put on that lens to try to
- 3:32:03analyze this and dissect if this is how
- 3:32:05I wanted it. Key things with this is I
- 3:32:08like to keep it symmetrical, right? So,
- 3:32:10I have all of my cards up at the top. I
- 3:32:13have the graphs equally spaced and
- 3:32:16equally made. I want to keep the visuals
- 3:32:18as simple as possible. So that's why I
- 3:32:20have the line and the bar charts on the
- 3:32:22left. We'll have a table and scatter
- 3:32:24plot on the right hand side, which I
- 3:32:25feel is less likely for them to look
- 3:32:27towards, but also we'll have that key
- 3:32:29information, especially in that table if
- 3:32:31they want to export it into Excel. So
- 3:32:33let's get into building this bad boy.
- 3:32:34We're going to be doing a rough draft
- 3:32:35first. We're going to be starting from
- 3:32:37the top and then building down.
- 3:32:42So, in your current workbook, we're
- 3:32:44going to stay in here because we're
- 3:32:45going to copy a lot of different
- 3:32:46visualizations from it and also use that
- 3:32:48same data set that we cleaned up. And
- 3:32:50I'm going to create a new page and we're
- 3:32:51going to call it data jobs dashboard.
- 3:32:53We'll leave the page all the way at the
- 3:32:54end. When we're done building this
- 3:32:56dashboard, we're going to go ahead and
- 3:32:58delete all these pages and save it as it
- 3:33:00no own PowerBI file. But for now, we'll
- 3:33:03just keep it all together. Anyway, first
- 3:33:04thing I'm going to do is put a title in
- 3:33:06here. So, I'm going to insert in a text
- 3:33:07box. And inside of it, I'm going to put
- 3:33:09data jobs dashboard. And I just
- 3:33:12formatted it to be a little bit bigger.
- 3:33:14Next up, I'm going to insert a slicer.
- 3:33:15So, I can go to our slicers pane and I'm
- 3:33:17going to select this one here on the job
- 3:33:19title. Going to insert it in. In this
- 3:33:22case, I want to keep them separate
- 3:33:23because they're their own dashboard. So,
- 3:33:25we're not going to sync. And I'm going
- 3:33:26to minimize some of these panes over
- 3:33:29here. So, I can come into here anyway. I
- 3:33:31want to change the format of this slicer
- 3:33:33specifically. I just want it to be a
- 3:33:34drop down. I don't want it to be too
- 3:33:36crazy. All right, so that's good. Now,
- 3:33:38let's move into putting the cards up.
- 3:33:40Remember, we're going to be doing job
- 3:33:41count, job rating, yearly salary, and
- 3:33:44hourly salary. I also have it in this
- 3:33:47format because job count, these graphs
- 3:33:50underneath it are going to correlate to
- 3:33:51the count. And then whereas the salary,
- 3:33:53everything underneath it, the scatter
- 3:33:55plot that deals with salary and the
- 3:33:57tables are going to deal with salary.
- 3:33:58So, I leave that aside. So, it makes it
- 3:34:00symmetrical but also intuitive. On the
- 3:34:02cards page, I'm going to copy this one
- 3:34:04that we have on median year salary. Ctrl
- 3:34:07+ C. And then paste it in over here. I'm
- 3:34:10going to align it towards the center
- 3:34:11because I know I want it over here. And
- 3:34:14we'll put it right here. Okay. I'm going
- 3:34:16to copy this one and then adjust the
- 3:34:18spacing. I also adjust the width a
- 3:34:20little bit. And then I'm going to go
- 3:34:21ahead and copy this. Paste another one
- 3:34:24right here. And then another one right
- 3:34:27here. First one. Remember, we want job
- 3:34:29count. So I'm going take that job tile
- 3:34:31short. throw it into here. Change
- 3:34:33aggregation account and then this to job
- 3:34:35count. Next thing I want that star
- 3:34:37rating for this. So I'm going to take
- 3:34:38the salary star rating, drag it into
- 3:34:41here. And this one looks like it's
- 3:34:42formatted good. And the only other one
- 3:34:44we need to change this one from median
- 3:34:46yearly salary to median hourly salary.
- 3:34:49Not too bad. Not liking how this number
- 3:34:52is formatted here. So under format or
- 3:34:54visual for this one, going into the
- 3:34:56values, changing the settings to just
- 3:34:58job count itself. We'll set the value uh
- 3:35:01the value decimal places to zero. Now
- 3:35:04let's put some visuals in here. We'll
- 3:35:07start with top left getting these job
- 3:35:10count over time on our line and area
- 3:35:12page. This one's good enough. We'll take
- 3:35:14a control C of this and I'll paste it
- 3:35:17right in. Next up, I want our job counts
- 3:35:20per job title. This is the closest one I
- 3:35:23can find on our column and bar chart
- 3:35:25page. So, I'm going to copy this. We'll
- 3:35:27just have to alter it. And I'll paste
- 3:35:29this in down here, squeezing it in. And
- 3:35:32then we'll change this from using that
- 3:35:33median yearly salary to instead using
- 3:35:36the count of jobs. Next up is that
- 3:35:39scatter plot in the top rightand corner.
- 3:35:41If you navigate to that common charts
- 3:35:42page, we're going to be using this one.
- 3:35:44I'm going to copy it, then paste it
- 3:35:45right into here. Format where it needs
- 3:35:47to go. All right, the final one is our
- 3:35:48table or more specifically our matrix
- 3:35:51that we made. So I'm going to go ahead
- 3:35:52and copy this and then we're going to
- 3:35:54put it down at the bottom right hand
- 3:35:55corner. All right. So, not so bad for a
- 3:35:57rough draft. We have everything that we
- 3:35:59want inside of here. If I wanted to, I
- 3:36:02could filter down for something like
- 3:36:03business analyst. And it shows us
- 3:36:06everything we need for this.
- 3:36:10Now, let's get this bad boy cleaned up
- 3:36:12now. And here's a look at where we're
- 3:36:14going to finally get to. Specifically, I
- 3:36:17like adding backgrounds and boxes to
- 3:36:20sort of box things off to draw people's
- 3:36:22attention in to where they need to go to
- 3:36:24and look. In this case, once again, I'm
- 3:36:26keeping it very symmetrical. But like I
- 3:36:29said, like with this job count, this
- 3:36:31area deals with counts and this side
- 3:36:33really deals with salary. So that's why
- 3:36:35I've designed it in this manner. Anyway,
- 3:36:38all this is doing is inserting shapes
- 3:36:40into here. And specifically, we're
- 3:36:42inserting it behind the visual. So going
- 3:36:45into insert into shapes, we're going to
- 3:36:47insert in a rounded rectangle. I'm going
- 3:36:49to put it over on top of the area that
- 3:36:51we want. We'll adjust the formatting
- 3:36:52here in a little bit, but first with
- 3:36:55under format shapes under the style, you
- 3:36:58know, I like that light blue. So, we're
- 3:37:00going to start with light blue. Also, I
- 3:37:02like shadows. So, we're going to add a
- 3:37:04shadow to this. And it also makes it a
- 3:37:05little bit smaller and not touching the
- 3:37:07edges. Now, with this selected, I've
- 3:37:10formatted enough. I'm going to control C
- 3:37:12it and then Ctrl +V. I'm going go
- 3:37:13through and just put this over all the
- 3:37:15different visuals in here. We'll then
- 3:37:17adjust the order after this. Not too
- 3:37:19bad. going into view and then selection.
- 3:37:23First of all, I'm going to select all of
- 3:37:25them together because I want to group
- 3:37:27them just to make it easier. I'm
- 3:37:28pressing control while I do this. And
- 3:37:30then I'm going to click the three dots
- 3:37:31and click group. Okay, so now it's all
- 3:37:34one group. I'll then name this to
- 3:37:37background. And then I can take the
- 3:37:39background all the way to the bottom of
- 3:37:41the selection. So that way it puts it
- 3:37:43behind. And now you're like, Luke, what
- 3:37:46happened? It disappeared. Well, as you
- 3:37:48can see through the cracks, it is there.
- 3:37:52Um, but we have to actually remove the
- 3:37:56backgrounds of all these other things.
- 3:37:58What do we mean by that? Okay, let's
- 3:37:59select a card. I'm going to minimize
- 3:38:01this and go into format visual. So,
- 3:38:04inside of here, I'm going to just
- 3:38:06actually search and I'm going to search
- 3:38:08for background. Underneath effects, I'm
- 3:38:11going to turn off this background. And
- 3:38:14then also on the cards itself, I'm gonna
- 3:38:18turn off that background. And we got to
- 3:38:20go through and do this for all of them
- 3:38:23as well. Turning off the effects
- 3:38:25background and then the cards
- 3:38:27background. For the graphs and visuals,
- 3:38:29it should be only the effects background
- 3:38:31that you need to turn off. But for the
- 3:38:33matrix, we need to not only do the
- 3:38:35effects background, but also you can see
- 3:38:37there's other white behind it. And for
- 3:38:39it, we need to go to layout and style
- 3:38:40presets. The style is on default right
- 3:38:43now. We're going to change it to none.
- 3:38:45Now, what I'm going to do is just go
- 3:38:46through and adjust the size of all this
- 3:38:48to make sure they fit within their
- 3:38:49appropriate squares. All right. So,
- 3:38:52looking good. Not too bad. If you wanted
- 3:38:55to dive into one of these, such as we
- 3:38:57did before, we can enter obviously focus
- 3:38:59mode and we can still see it everything
- 3:39:01visually. But the only thing that I'm
- 3:39:04seeing left is how these icons have this
- 3:39:08white value and it can get sort of
- 3:39:09distracting from what's going on there.
- 3:39:11These are controlled under general and
- 3:39:14header icon. You can't just toggle them
- 3:39:17on or off, unfortunately. You have to
- 3:39:19actually change the transparency to 100%
- 3:39:22to make it sort of hide a little bit
- 3:39:24better. So, I'm going to go through and
- 3:39:25just hide all these different ones. All
- 3:39:27right, not too bad. Going to go ahead
- 3:39:29and save this.
- 3:39:32We're going to stop right there for this
- 3:39:33page. In the next lesson, if you will,
- 3:39:35we'll be building the second page for
- 3:39:37this. and we're going to be using a new
- 3:39:38feature that we haven't discussed yet
- 3:39:40and that's drill through. There's no
- 3:39:42practice problems for this lesson or any
- 3:39:45lessons in the project. And with that,
- 3:39:47see you in the next one.
- 3:39:51All right, welcome to the second of
- 3:39:53three videos in this project section.
- 3:39:55We're now going to get into building our
- 3:39:58drill through page. And you're probably
- 3:40:00like, what the heck is a drill through?
- 3:40:02So, let's actually demonstrate it in
- 3:40:04action. Here I am in our final dashboard
- 3:40:06right here. And right now users can go
- 3:40:09through and see different things. And
- 3:40:11typically they're going to want to look
- 3:40:13in or dive in deeper to something. Let's
- 3:40:16say I'm a data engineer and I come in
- 3:40:17here and I select that engineer to find
- 3:40:19out different values about it. Well, I
- 3:40:22want to learn more. Well, if you notice
- 3:40:23this button up at the top became well,
- 3:40:26it moved from a uh grade out to actually
- 3:40:29ungrade out, if you will, or a visible.
- 3:40:32And so now it says drill through to job
- 3:40:34title. And what I can do is press
- 3:40:36controlclick to it. And now we're
- 3:40:38directed to our drill through page. And
- 3:40:41this is what we're going to be building
- 3:40:42in this course specifically for this
- 3:40:45lesson. Anyway, with it, this has
- 3:40:48specific metrics that I feel are more
- 3:40:51applicable at a job title level. And
- 3:40:54remember, we selected data engineer. We
- 3:40:56have that at the top. Then we have
- 3:40:57things like the hourly and yearly
- 3:40:59salary, the different percentages for
- 3:41:00all the different attributes, and then
- 3:41:02some different visualizations as well.
- 3:41:04Anyway, if we want to navigate back to
- 3:41:06home, we can click this icon to go back,
- 3:41:08and bam, we're back at the data jobs
- 3:41:10dashboard, and everything's cleared. So,
- 3:41:12let's actually get into building this
- 3:41:15drill through.
- 3:41:18So, in our PowerBI file, I'm going to
- 3:41:19create a new page, and I'm going to call
- 3:41:21it job title drill through. First thing
- 3:41:23I'm going to stick in here is a card.
- 3:41:26similar to the last thing up at the top
- 3:41:27that displays what is the job title
- 3:41:29we're drilling through to. So, I'm just
- 3:41:31going to come in here and we're going to
- 3:41:32steal it from our first dashboard, at
- 3:41:33least the formatting for it, and paste
- 3:41:35it up here in the top. Now, for this,
- 3:41:37right, I want the job title that it's
- 3:41:39filtered to to displaying in this card.
- 3:41:42So, I'm going to drag this job title
- 3:41:44short column over into the data to
- 3:41:46replace it. And I'm going to call this
- 3:41:49job title Joe through since that's the
- 3:41:51name of our page. Anyway, right now I'm
- 3:41:54aggregating to the first value that
- 3:41:57appears and right now it's business
- 3:41:58analyst. So let's actually experiment
- 3:42:02with or actually implement our drill
- 3:42:04through. So you may have noticed before
- 3:42:06on the visualizations pane if I actually
- 3:42:08scroll all the way down they have this
- 3:42:11section here on drill through and this
- 3:42:14says hey you can add drill through
- 3:42:16fields here. For example, we want to
- 3:42:19drill through based on well what this
- 3:42:21card has too, but that job title short
- 3:42:23column. And inside of it, it allows you
- 3:42:26to filter the data for what you want.
- 3:42:28We're going to leave everything as is.
- 3:42:30So overall, you can see nothing really
- 3:42:32changed on this page. Well, something
- 3:42:35that did change. We got this back arrow
- 3:42:37up at the top lefthand corner. But this
- 3:42:40now is where the magic happens. I can go
- 3:42:43to data jobs dashboard and something
- 3:42:46like data engineer. I can go ahead and
- 3:42:49select it. Right, we don't have a button
- 3:42:51just yet. But what I can do is I can
- 3:42:53rightclick it and inside of this popup
- 3:42:56it says drill through. And then it says
- 3:42:59we can drill through to the page of job
- 3:43:02title drill through. And I'm now taken
- 3:43:04to that page. And that page is filtered
- 3:43:08for data engineer. One note, you can
- 3:43:11selecting this card itself and then
- 3:43:13scrolling on down to drill through.
- 3:43:15Right now we have keep all filters on
- 3:43:18for the drill through. So basically the
- 3:43:19filter on the other page that cross
- 3:43:21filters applied to here. And any other
- 3:43:23filters that we may have on that page
- 3:43:25are applied to this page. I like to keep
- 3:43:27it on. Keep it on. Oh, and then to demo
- 3:43:30we still have that they we have that
- 3:43:31arrow up there. The arrow then takes us
- 3:43:34back to the previous page in the report
- 3:43:36that we came from. Now, this isn't
- 3:43:38specific. We didn't add anything to the
- 3:43:40data jobs dashboard. Just a demo. If I
- 3:43:42went to that column and bar section, we
- 3:43:45could do the same thing inside of here.
- 3:43:47Drill through to that job title. Drill
- 3:43:49through. And then we did it for senior
- 3:43:50data scientist. So, I could navigate
- 3:43:53back to that as well. All right. So,
- 3:43:54let's start building out this page.
- 3:43:56We're going to start at the top building
- 3:43:58out these visuals and then working our
- 3:44:00way down into the map, bar chart, and
- 3:44:03also the tree map. I'm going to take our
- 3:44:05yearly salary gauge and copy it from our
- 3:44:07cards page. Put it all in. Format it
- 3:44:10down. Duplicate this and then change
- 3:44:12everything so that way it's hourly
- 3:44:14salary. Don't forget also to change the
- 3:44:15title. Next up are those fancy dancy
- 3:44:17doughnut charts we made in the common
- 3:44:18charts lesson. I'm going to go ahead and
- 3:44:20copy this and then from there duplicate
- 3:44:22it three times. I had to move things
- 3:44:24around. It's not going to be as
- 3:44:25symmetrical as I want it. I'm also going
- 3:44:27to change these titles now. I don't want
- 3:44:28them all work from home. So change it to
- 3:44:30no degree mentioned health insurance.
- 3:44:32Now, we need to actually adjust the
- 3:44:34values in here to actually use what
- 3:44:35we're supposed to be using. All right,
- 3:44:37not too bad. I messed up the coloring
- 3:44:39here. I need to just clean it up while
- 3:44:41we're in this. Specifically, I'm going
- 3:44:42to change all the true values to this
- 3:44:44blue color and the false values to like
- 3:44:46a lighter gray. That way, these all have
- 3:44:48a similar type format. All right, three
- 3:44:51more visuals left. I'm going to go to
- 3:44:52the map chart. I'm going to go in and
- 3:44:54steal this one here for where we were
- 3:44:56looking at the mentioning of the job
- 3:44:58postings. Mention degree. We're actually
- 3:45:00going to remove that from the legend. Go
- 3:45:02ahead and put that in there and then
- 3:45:04remove that from the legend so it's only
- 3:45:06showing job counting and give it the
- 3:45:08title where are jobs globally. Next up
- 3:45:10from the common charts lecture I'm going
- 3:45:13to steal this one are what are the type
- 3:45:15of data jobs and put that one in right
- 3:45:17here into the center bottom right. Last
- 3:45:20one that needed this one we don't have
- 3:45:22already. I'm going to insert in a stack
- 3:45:24bar chart. Make it fill in the remaining
- 3:45:26value. For this one, I want to look at
- 3:45:28that job via column, specifically the
- 3:45:30count, like where are the job postings.
- 3:45:32As we can see, LinkedIn is the top one.
- 3:45:34And then I update this to what platform
- 3:45:36has most jobs along with changing this
- 3:45:38one to what are the types of jobs. So,
- 3:45:40this has most what we want. Let's
- 3:45:41actually test it out. We're going to go
- 3:45:43back to the data jobs dashboard. And we
- 3:45:45can now click on this. And if we want to
- 3:45:48rightclick, drill through to the job
- 3:45:50title uh through page. Now, we're
- 3:45:53looking at everything for data
- 3:45:54engineers. can see where they're
- 3:45:56located, what platform we go to, and
- 3:45:58what type. Not too bad. I wouldn't mind
- 3:46:01now going back here. We do want a button
- 3:46:04up here because most users are not going
- 3:46:06to be intuitive enough to think that,
- 3:46:08hey, I can right click and go to the
- 3:46:09drill through. So, under the insert tab,
- 3:46:11I'm going to go to buttons. And for
- 3:46:14this, we're going to insert a blank
- 3:46:15button that's going to be put up here.
- 3:46:17We'll then go ahead and now format it.
- 3:46:20Now, we'll go into format button. We're
- 3:46:21going to turn on the action itself.
- 3:46:23Specifically, we want it to drill
- 3:46:26through. So, we'll change this from back
- 3:46:27to drill through. And for the
- 3:46:29destination, we need to make sure we
- 3:46:31select job title drill through. Okay.
- 3:46:33So, now just testing this out. I click
- 3:46:35data engineer. It's no longer grayed
- 3:46:37out. Clicking control. It navigates me
- 3:46:40to this page. And I can navigate back.
- 3:46:42But this button, we don't need to just
- 3:46:43leave grayed out. Let's actually format
- 3:46:45it by making it into a round rectangle.
- 3:46:47Turning on the fill and making it
- 3:46:49obviously to a light blue. And then
- 3:46:51turning on the shadow. Oh, we obviously
- 3:46:53want the text on in there. And I'm going
- 3:46:56crank up the text size that says drill
- 3:46:59through to job title. I'll even make it
- 3:47:01bold. Okay. So now, whenever we're
- 3:47:04inside of here, if I click on something
- 3:47:05like that, engineer, boom, it's popping
- 3:47:07up. Press control, drill through to job
- 3:47:10title, and I can navigate back if I want
- 3:47:12to.
- 3:47:15All right. So, similar to that last page
- 3:47:17we did, we need to now clean this up. I
- 3:47:20want to put some like we did in this
- 3:47:22one. Put the borders and the background
- 3:47:24behind it. So, I'm going to go ahead and
- 3:47:26copy this. Press Ctrl + C and then paste
- 3:47:29that into here. We're going to have to
- 3:47:30reformat all the different sizes in
- 3:47:32here. First things first, I'm going to
- 3:47:33go into the view tab and open up the
- 3:47:36selections pane. We're also going to
- 3:47:38close these on downs to make a bigger
- 3:47:40view. Anyway, remember we named it
- 3:47:41background for this. I don't need these
- 3:47:44top two in here. So, what I'm going to
- 3:47:45do is just select ungroup. And then
- 3:47:49we're just going to go ahead and
- 3:47:52actually delete it then by removing it.
- 3:47:55Okay. Now, these are ungrouped. I can
- 3:47:57just drag these into position where I
- 3:47:58want them. All right. Not too bad.
- 3:48:00Pressing control. I want to group these
- 3:48:02all back together. I rightcicked it.
- 3:48:05Plus group. Renamed again to background.
- 3:48:09And then move all the way to the back.
- 3:48:11It looks like I missed a shape. I'm
- 3:48:13going to go ahead and just drag this on
- 3:48:15down and then open up background and
- 3:48:17throw it inside of there because
- 3:48:18apparently I forgot it. Okay, like last
- 3:48:20time, we need to remove these white
- 3:48:22backgrounds on here. So, going into each
- 3:48:25one of these visuals themselves, opening
- 3:48:27up that visualization pane and then in
- 3:48:29the search bar, putting in background,
- 3:48:31I'm going to turn off the background
- 3:48:33effects for these. Getting to the map, I
- 3:48:36was able to do that as well with
- 3:48:37background effects. This one also. And
- 3:48:40then finally, our tree map. Okay, these
- 3:48:42all need to get resized now to fit in
- 3:48:44there appropriately. Like last time, I
- 3:48:45don't like these header icons with this
- 3:48:47color here. So, I'm going to make the
- 3:48:49transparency 100%. And do this for all
- 3:48:52of these. All right. So, boom. Let's
- 3:48:55test this bad boy out. We're going to
- 3:48:56navigate back. Okay. Inside of our data
- 3:48:59jobs dashboard, if we want to dive into
- 3:49:02something like data analyst, we can see
- 3:49:04the key statistics here. And then diving
- 3:49:07into the drill through itself, I can see
- 3:49:09that just for data analyst, what are all
- 3:49:12the different metrics for it? And if I
- 3:49:14wanted to, I can filter down even
- 3:49:16further inside of here. All right, so
- 3:49:18that wraps up what we're going to be
- 3:49:19doing for building out this first
- 3:49:22project. In the next lesson, we're going
- 3:49:24to be jumping into actually how we can
- 3:49:27share it using PowerBI service. And if
- 3:49:29you don't have that or you want to do a
- 3:49:31different option, we're going to have
- 3:49:32GitHub as well. With that, I'll see you
- 3:49:34there. All
- 3:49:38right, welcome to this lesson on going
- 3:49:40through how we're going to go share this
- 3:49:42first dashboard. And first of all,
- 3:49:44congratulations for completing this
- 3:49:46first dashboard. It's quite an
- 3:49:47accomplishment. Now, this video is
- 3:49:49completely optional. You can decide if
- 3:49:51you want to go through it or not.
- 3:49:52Basically, at the beginning, I'm going
- 3:49:54to go over what are the different
- 3:49:55options, and then the majority of it is
- 3:49:57going to be spent on how we can actually
- 3:50:00set up and share your project on GitHub.
- 3:50:02But if you don't want to share your work
- 3:50:04and potentially get a new job with
- 3:50:06higher pay, feel free to skip to the
- 3:50:08next chapter on Power Query.
- 3:50:13So, let's go over these three options
- 3:50:15that I'm going to recommend for how you
- 3:50:17can go about sharing your dashboard. The
- 3:50:20first one is the most recommended option
- 3:50:23and I think that you'll get the most
- 3:50:24visibility with it. Specifically, it
- 3:50:27involves LinkedIn, and I have a lot of
- 3:50:29success sharing projects on here and
- 3:50:32gaining future opportunities because of
- 3:50:33it. Inside your profile area, they have
- 3:50:36a section down here at the bottom on
- 3:50:38projects. And this is where you can
- 3:50:40showcase all your different work. It's
- 3:50:42pretty easy to go through and actually
- 3:50:44add in your project. Besides that, the
- 3:50:46second option is what I also recommend
- 3:50:48of actually just making a post and then
- 3:50:51linking to that project that you've
- 3:50:54created about this. However, there's a
- 3:50:56pretty key limitation with sharing
- 3:50:59projects in LinkedIn. I'm going to go
- 3:51:00through this data science one just to
- 3:51:02show specifically. I can write about it
- 3:51:05inside of here and say what I did, but
- 3:51:06then if I want to direct them or give
- 3:51:08them the file of what I did, where do I
- 3:51:11do? The only thing I can do is link them
- 3:51:13to another location. which now gets into
- 3:51:16this is my second option for how you
- 3:51:19should combine this with LinkedIn to not
- 3:51:21only share on LinkedIn but also put all
- 3:51:23your work inside of here. For those that
- 3:51:25are not familiar with GitHub, GitHub is
- 3:51:28an online repository that allows you to
- 3:51:31keep track of all your different
- 3:51:33projects that you're working on. I go
- 3:51:35through and actually like you noticed
- 3:51:36before I've shared all my courses here
- 3:51:39because I consider it my work and it
- 3:51:41makes it super simple for somebody to
- 3:51:42come in and actually view it. Anyway,
- 3:51:45let's get into what we're going to be
- 3:51:46building for this. Specifically, we're
- 3:51:48going to be setting up what's called a
- 3:51:49readme file, which that's what this is
- 3:51:51below here. And this is going to
- 3:51:54document on GitHub all of the different
- 3:51:56work we did in creating this dashboard.
- 3:51:59We're include all the different skills
- 3:52:01we showcased while building this. And
- 3:52:03then we're going to break down each of
- 3:52:05those pages that we've created while
- 3:52:07building this. Now, this, like I
- 3:52:09mentioned, is the readme, but then I can
- 3:52:11also store this PowerBI file, which is
- 3:52:14right there. And so, if a user wanted to
- 3:52:17access it, all they got to do is just
- 3:52:19download it. And they just do this by
- 3:52:21clicking on the file and then going down
- 3:52:22to download. And you may be like, Luke,
- 3:52:24what about the PowerBI service? How
- 3:52:26could you integrate that with this?
- 3:52:28Well, I actually integrated this with
- 3:52:30this readme if you have the option for
- 3:52:32this. Anyway, I include a link inside of
- 3:52:34here. It says, "Hey, view the
- 3:52:36interactive dashboard here on the
- 3:52:37PowerBI service." I click on it and this
- 3:52:39navigates me to the online version of
- 3:52:42our dashboard and people can go through
- 3:52:45and actually interact with it to see all
- 3:52:47that we built and get some use out of
- 3:52:50it. Now, I feel a majority of you are
- 3:52:52not going to be actually using the
- 3:52:54PowerBI service because it costs $14 a
- 3:52:57month. And frankly, I feel that's
- 3:52:58overpriced just to host a project. So,
- 3:53:01that'll be a completely optional
- 3:53:02statement that you'll be able to include
- 3:53:04if you want to or not in your GitHub
- 3:53:06repo. So, for the remainder of this
- 3:53:08video, we're going to be going through
- 3:53:10these three major steps in order to get
- 3:53:14our work into a readme and then onto
- 3:53:17GitHub and then share on LinkedIn. Let's
- 3:53:19walk through it real quick. In the first
- 3:53:21portion, we're going to install all the
- 3:53:23required tools. Don't worry, they're
- 3:53:24completely free. Specifically, they
- 3:53:26consist of a tool of Git and also VS
- 3:53:29Code. Git works in the background and is
- 3:53:32basically going to track all of our
- 3:53:33different changes and allow us to
- 3:53:35monitor our work. And then VS Code is
- 3:53:38what's working on the front end to allow
- 3:53:40us to create that readme, organize our
- 3:53:42project files, and then send that up to
- 3:53:44GitHub. Because of that, we're going to
- 3:53:45need a GitHub account, which we're going
- 3:53:47to do during this portion. For the
- 3:53:48second part, we're going to prepare the
- 3:53:50project. We're going to create that
- 3:53:52readme that I showed you on GitHub and
- 3:53:54then set up the file and folder se uh
- 3:53:57structure correctly to where we can then
- 3:53:59upload it. Which takes us to our third
- 3:54:01point of sharing our work. We're going
- 3:54:03to put it onto GitHub and then link it
- 3:54:06on our LinkedIn and also make a post.
- 3:54:08Like I mentioned before, this isn't of
- 3:54:10interest to you, feel free to skip to
- 3:54:12the next video.
- 3:54:15The first thing we need to do is get Git
- 3:54:17installed. Now, Git is a free and
- 3:54:20open-source distributed version control
- 3:54:22system designed to handle everything
- 3:54:24from small to very large projects. It's
- 3:54:26by far the most popular tool used for
- 3:54:28basically tracking changes with files
- 3:54:31and allowing large teams to collaborate
- 3:54:34together. to break it down more simply
- 3:54:36on what it actually is or what's
- 3:54:38happening there. Here I am inside of my
- 3:54:41folder or what we'll know as my repo
- 3:54:44repository for PowerBI. Anyway, there's
- 3:54:47some hidden files in here. I'm on a Mac.
- 3:54:50I'm going to press command shift period
- 3:54:51and I can unhide these files. Anyway, I
- 3:54:53have agit file and a.get ignore. Anyway,
- 3:54:56the file is the more important one here.
- 3:54:59Basically, this is the file that's being
- 3:55:01maintained to keep track of all the
- 3:55:04different tri uh different changes
- 3:55:06inside of this project. Because I am
- 3:55:09using git to manage this project, it
- 3:55:12then allows me to then host this project
- 3:55:16online, specifically on GitHub. GitHub
- 3:55:19being an online repository for those
- 3:55:22that are using Git. They can send things
- 3:55:24to this what we call a remote repository
- 3:55:27to keep your projects here. Anyway, if I
- 3:55:29didn't have Git locally on my computer
- 3:55:31whenever I build these projects, then I
- 3:55:33can't use GitHub. So, this allows me to
- 3:55:35use GitHub. Anyway, back to the page
- 3:55:37where we need to download Git. You can
- 3:55:39just navigate to the link below and
- 3:55:41we're going to go into downloads. You're
- 3:55:42most likely on a Windows. Select that
- 3:55:44and we'll start to click here to
- 3:55:45download using the ARM 64 version. for
- 3:55:48you. It should probably recommend what
- 3:55:49type of computer you have. You may have
- 3:55:51an x64. It'll recommend up at the top.
- 3:55:54Click that one. Once download's
- 3:55:55complete, launch it, allow it to access
- 3:55:57your device. We're going to go through
- 3:55:58the installation, and just leave
- 3:56:00everything set to the default. There are
- 3:56:01about 10ish items that I selected. Okay.
- 3:56:04And now I'm installing. Once it's
- 3:56:05complete, I'm going toclick this and
- 3:56:07then just go in finish. Git is now
- 3:56:09installed. The next step is getting VS
- 3:56:12Code. Now, this tool of VS Code is a
- 3:56:16text editor and it's pretty simple. I
- 3:56:19just want to demo it before we actually
- 3:56:20go and install it. We're allowed to see
- 3:56:22all the different files for a project.
- 3:56:24So, in this case, this is my PowerBI
- 3:56:26file and we're downloading this and
- 3:56:29using this for two main reasons. First
- 3:56:31of all is because we'll be able to
- 3:56:32create a readme inside of here. And this
- 3:56:35readme uses a special markup language
- 3:56:38which I can view what this markup
- 3:56:40language looks like or what it's going
- 3:56:42to look like on the internet right next
- 3:56:44to it. If you recall, this looks very
- 3:56:46similar to what's on GitHub. The other
- 3:56:48main reason why we're using this is
- 3:56:50because this allows us to interact and
- 3:56:53push this up to GitHub using Git behind
- 3:56:56the scenes. So this is a great tool
- 3:56:59especially I like using this with things
- 3:57:00like Python and SQL. Anyway, how are we
- 3:57:03going to install it? Just go to the
- 3:57:04Microsoft Store, search for VS Code, and
- 3:57:07it should be the first one. Not this
- 3:57:08one. That's the insiders, but this one
- 3:57:10right here. Once it's installed, you can
- 3:57:12just open it right up. They have a
- 3:57:13getting started screen right here. We're
- 3:57:15going to skip this for the time being.
- 3:57:16I'm just going to close out of it. The
- 3:57:18last portion to do in setup is setting
- 3:57:20up our GitHub account. For this one,
- 3:57:22pretty simple. All you have to do is
- 3:57:24just go enter your email and sign up for
- 3:57:26GitHub. Once logged in, you should be
- 3:57:28directed to your profile. If not, click
- 3:57:30your icon in the upper right hand corner
- 3:57:32and navigate to your profile. Anyway,
- 3:57:34with this, I would go forward and
- 3:57:36actually set up well, setting up your
- 3:57:38profile, specifically adding a profile
- 3:57:40picture, and then any other links or
- 3:57:43information about yourself inside of
- 3:57:45here. Over here on the right are my
- 3:57:47pinned repositories, and you'll be able
- 3:57:49to add this later on whenever we add our
- 3:57:50project.
- 3:57:53Now that we have everything needed
- 3:57:55installed, we're going to now jump into
- 3:57:58preparing our project. We're going to do
- 3:58:00two major steps. First is just setting
- 3:58:02up our project and having our folder
- 3:58:05where we need it access accessed inside
- 3:58:07of VS Code. And the second step, which
- 3:58:09is probably the longer step, is actually
- 3:58:11creating our readme. First thing we need
- 3:58:14to do in getting our project folder all
- 3:58:16together is well getting our PowerBI
- 3:58:19file in order. Specifically, we've been
- 3:58:22working within this entire folder or
- 3:58:26this entire file that has all of our
- 3:58:27work from everything in chapter 2. I
- 3:58:31only want to have the dashboard page and
- 3:58:33the drill through page in there. So, how
- 3:58:35are we going to do this? Well, first I'm
- 3:58:36going to save this with the appropriate
- 3:58:38title so that way I don't lose any work
- 3:58:40just in case. I'm going to save it as a
- 3:58:41new file. So, I'm going to save it with
- 3:58:43the name data jobs dashboard and save it
- 3:58:46to a name known location. I'm saving it
- 3:58:48to the desktop for me. Now that I can
- 3:58:49see it is saved, I can then go through
- 3:58:52and get rid of all the different other
- 3:58:54pages. Also, I added these home icons on
- 3:58:57here. I don't think we you did, but if
- 3:58:58you did happen to, I'd go ahead and
- 3:59:00remove them cuz it's not going to take
- 3:59:01you anywhere. With the dashboard or the
- 3:59:03homepage selected, that's very important
- 3:59:05you do this. Now, go ahead and save this
- 3:59:07because whenever somebody opens this
- 3:59:08file, it's going to be navigated to
- 3:59:10whatever page you have saved last. At
- 3:59:12this time, I'd also recommend going
- 3:59:13through and publishing to the PowerBI
- 3:59:16service if you have that set up. Once
- 3:59:18that's done, I'm going to go ahead and
- 3:59:20close out of it. So, let's go ahead and
- 3:59:22open the folder for our project or for
- 3:59:25the folder that we're going to be using
- 3:59:26for this. In this, I'm going to go ahead
- 3:59:28and select file and then new window.
- 3:59:31Whenever I do this, I have this start
- 3:59:33open and it says, hey, do you want to
- 3:59:34open a folder? Yes, I do. Specifically,
- 3:59:36we need to open our project folder,
- 3:59:39which we haven't created yet. So, I'm
- 3:59:40going to click on desktop because that's
- 3:59:41where I want it. Going to create a new
- 3:59:43folder. And then I'm going to name it
- 3:59:45what I want the name of this project to
- 3:59:49be called, and I'm going to call it
- 3:59:50simple like PowerBI dashboard. It's
- 3:59:53going to select that and select folder.
- 3:59:55It's ask if I trust the author of this.
- 3:59:56The author's me. I don't really trust
- 3:59:58myself, but I'm going to click yes
- 3:59:59anyway. Now, right now over here on the
- 4:00:02left hand side, this is the file
- 4:00:04explorer. And right now, there's no
- 4:00:06files inside of it. So, first of all, we
- 4:00:08want our PowerBI file inside of here.
- 4:00:11The easiest way to get it in there is
- 4:00:12just open up File Explorer, drag that
- 4:00:14PowerBI file that we have wherever you
- 4:00:16have it saved and into PowerBI
- 4:00:19dashboards. Closing this out, see that
- 4:00:21the PowerBI file is now there. Notice
- 4:00:23you're going to have this sort of error
- 4:00:25message. This file is not displayed in
- 4:00:27text ed because it's either binary and
- 4:00:29well, it is binary. It doesn't support
- 4:00:31the method to actually view it here. You
- 4:00:33can't view PowerBI files in VS Code. Not
- 4:00:36a big deal. going to close out of this.
- 4:00:38Now, the next thing we want to do is
- 4:00:40create a readme. So, up here on the
- 4:00:44icons, you can create a new file, a new
- 4:00:46folder, and whatnot. We're going to
- 4:00:47create a new file. For this, we want to
- 4:00:49create a markdown file called readme.
- 4:00:52It's really important we name this
- 4:00:53correctly. So, read me in all caps and
- 4:00:55then MD. When we do that, read me opens
- 4:00:58up on the right hand side for us to go
- 4:01:00through and text edit it. They have this
- 4:01:01popup here for basically prompting us to
- 4:01:03use GitHub Copilot. You can use that if
- 4:01:05you want or not. We're not going to try
- 4:01:07to demo it for this video. Anyway, I can
- 4:01:09type things in here like this is a test.
- 4:01:12And then if we want to see what it looks
- 4:01:14like, we come up here to the right hand
- 4:01:15side and we open the preview to the
- 4:01:17side. I'm going to minimize the explorer
- 4:01:19right here. So, we can see things like
- 4:01:21this is a test. Now, how we're going to
- 4:01:24go through some basics now of how to
- 4:01:26format in Markdown. Well, if you
- 4:01:28navigate to the link below, this
- 4:01:30provides a cheat sheet of how you can
- 4:01:32use this basic syntax in order to mark
- 4:01:36up your document. We're going to go
- 4:01:38through these basic items first. So,
- 4:01:41first thing is I want a heading. So, I'm
- 4:01:44going to put a hashtag and then followed
- 4:01:47by what we want to put. In this case, I
- 4:01:48put the title of our project. I could
- 4:01:50also do things like a heading. That was
- 4:01:52a heading one. I could do a heading two
- 4:01:54and put an introduction and then
- 4:01:55underneath it put a couple sentences of
- 4:01:58what we went through and actually did
- 4:02:00here. Now, there's some things I want to
- 4:02:02emphasize in this and so I want to bold
- 4:02:04them. In order to do that, I'm going to
- 4:02:06put two asterisk
- 4:02:09asterises around where I want it to bold
- 4:02:12and luckily it makes it nice and
- 4:02:14highlighting it here inside the markdown
- 4:02:16file, but then you can also see it in
- 4:02:17the preview. I could also use something
- 4:02:19like a single asterisk to make things
- 4:02:22into an italics. Now, let's move on to
- 4:02:25some other items. I'm going to go into
- 4:02:27what skills we showcased with this. And
- 4:02:29in this, I want to use bullet points.
- 4:02:31So, what I can do is use a dash and then
- 4:02:34space. And as you can see, it made into
- 4:02:35a bullet point and then list the skill.
- 4:02:38In this case, I put data transformation
- 4:02:39ETL with Power Query and then put a
- 4:02:41little synopsis about it. I'm going to
- 4:02:43go ahead and add some other skills as
- 4:02:44well. Feel free to choose which ones you
- 4:02:46want to highlight, but specifically I
- 4:02:48have implicit measures, core charts,
- 4:02:50geospatial analysis, KPIs, and dashboard
- 4:02:53design. Also go over some interactive
- 4:02:55reporting, how we use slicers, butings,
- 4:02:57and drill through and whatnot. Anyway,
- 4:02:58whatever we want to highlight, put it
- 4:03:00there. Now, if you remember from my repo
- 4:03:03on my readme, we had an image up at the
- 4:03:07top. How the heck do we go about putting
- 4:03:09an image in here? Well, navigating into
- 4:03:11that PowerBI file, we're going to go
- 4:03:13ahead and use a tool called snip that's
- 4:03:16automatically on your Windows computer.
- 4:03:18For this, as it says, you need to press
- 4:03:20the Windows logo key plus shift plus S.
- 4:03:22So, I'm going to do that right here and
- 4:03:25snapshot that bad boy. I selected markup
- 4:03:27and share. So, I want to go in and
- 4:03:29actually save it somewhere. So, I'm
- 4:03:31going to navigate back to that PowerBI
- 4:03:32dashboards file folder that we have, and
- 4:03:35I'm going to create a new folder in here
- 4:03:37called images because I want to keep all
- 4:03:38my images in one spot. Not that I'm all
- 4:03:40over the place. Anyway, inside of here,
- 4:03:42I'm just going to call something like
- 4:03:43project one, page one. Then, I'm going
- 4:03:45to repeat this again for the second
- 4:03:46page. Saving it as project one, page
- 4:03:49two. Save it. So, now let's put this
- 4:03:52image inside of our readme. In our
- 4:03:55little cheat sheet here, we can see that
- 4:03:57in order to insert an image, we need to
- 4:03:59use this syntax right here. So, I'm
- 4:04:01going to go ahead and just copy this and
- 4:04:03then paste it right above the title.
- 4:04:05Notice here it's got this broken image
- 4:04:07because we haven't connected the image
- 4:04:08yet. I'm going to call this dashboard
- 4:04:09page one. And then inside of parentheses
- 4:04:12here, that's where we want to go to the
- 4:04:14location of the file. I'm going to hit
- 4:04:16forward slash. And then this is going to
- 4:04:18pop up show me all the different files
- 4:04:21here in this repo. Remember if I open up
- 4:04:23the explorer I can also see them here.
- 4:04:25So let me demo that again. Whenever I
- 4:04:26hit this I get data jobs dashboard which
- 4:04:28is right here. Images folder and read
- 4:04:30me. Let's go into images. And then from
- 4:04:34there I can do backslash again and
- 4:04:37insert in what file I want. I want this
- 4:04:40project one page one png. And then put
- 4:04:42that close parenthesis. And bam. Now
- 4:04:44it's appearing right here on our
- 4:04:46readman. We'll close this out. Make this
- 4:04:47a little more readable. Now, below these
- 4:04:50skills showcased, I'd like to also go
- 4:04:52through and break down which uh contents
- 4:04:55or what each one of these pages
- 4:04:57contains. So, I'm going to create a
- 4:04:58heading two for dashboard overview and
- 4:05:00then do a heading three to de uh to go
- 4:05:02over page one highle market view. For
- 4:05:05this, I'm just going to copy this image
- 4:05:06that we have above and put it in right
- 4:05:09underneath this. Now, with that, now
- 4:05:11that it's in there, I'm just going to
- 4:05:12give a short little description under
- 4:05:14this, maybe one to two sentences of what
- 4:05:16we're doing in this page one of our
- 4:05:19dashboard. And then right underneath
- 4:05:21this, I'm going to do the same thing for
- 4:05:23page number two. And then finally,
- 4:05:25underneath it, I'm going to wrap it up
- 4:05:26with a conclusion. What are my lessons
- 4:05:28learned? What did I get out of this
- 4:05:30project? All right. Bam. This project
- 4:05:33readme is done. One quick note, if you
- 4:05:36did share this on the PowerBI service, I
- 4:05:38would go ahead and add that link in
- 4:05:40right here, right below the picture, the
- 4:05:43first picture. For links, what we're
- 4:05:45going to do is we're going to put every
- 4:05:46all the words that we want in the link
- 4:05:48in brackets and then in parentheses,
- 4:05:51we're going to put the hyperlink to
- 4:05:53where the dashboard is. It's similar to
- 4:05:56pictures, but it doesn't have that
- 4:05:57exclamation point in the front of it.
- 4:05:58Anyway, I created a shorter link. And so
- 4:06:01now I whenever I go to click on this, it
- 4:06:04will navigate me into my web browser
- 4:06:06which connects me directly to the
- 4:06:08dashboards itself. Pretty neat.
- 4:06:13All right, so we've set up our entire
- 4:06:14project folder and created that readme.
- 4:06:17Next thing we do, smooth sailing, we
- 4:06:19need to upload to GitHub and then share
- 4:06:21on LinkedIn. So inside of VS Code, I'm
- 4:06:24going to close out this preview, but I'm
- 4:06:25going to go ahead and save this by
- 4:06:27pressing Ctrl S. You can also just go up
- 4:06:30into file and select save as well. And
- 4:06:32I'm going to close out of this. Open
- 4:06:33back up that file explorer. Okay, so
- 4:06:36this is our folder structure right now,
- 4:06:37right? We have a PowerBI file, the
- 4:06:38readme, and then our images in here. In
- 4:06:40project two, we're going to modify this
- 4:06:43structure and also upload the same thing
- 4:06:45into GitHub. But for now, being this is
- 4:06:47going to be perfectly fine. So I'm going
- 4:06:49to move on down here and go into source
- 4:06:52control. And what's going to happen with
- 4:06:54this now is we have two options to
- 4:06:57either initialize the repository and
- 4:06:59that's basically setting up git to track
- 4:07:01those changes within it. And then the
- 4:07:04second option is publish to GitHub which
- 4:07:07is basically initializing the repository
- 4:07:10and then publishing to GitHub. So it
- 4:07:11takes the next step of publishing to
- 4:07:13GitHub. We want to do this second option
- 4:07:15to just but because that's what our end
- 4:07:17goal is. So I'm going to go ahead and
- 4:07:18select publish to GitHub. and it says,
- 4:07:20"Hey, we want to sign into GitHub
- 4:07:22because right now VS Code is not linked
- 4:07:24to GitHub." Go ahead and authorize it.
- 4:07:27And I'm going to enable to always allow
- 4:07:28VS Code to open links of this type. Oh
- 4:07:31no, I didn't mean to click cancel.
- 4:07:33Oh well, it'll be fine. In here for the
- 4:07:36name of the dashboard, I'm going to
- 4:07:37press enter. Actually was a big deal. I
- 4:07:39need to go back and select open. Anyway,
- 4:07:42it's asking, do we want to publish as a
- 4:07:43private or public repository? We want to
- 4:07:45make this public. It's asking us what
- 4:07:47files do we want to include in this. We
- 4:07:49want to include all of these files in
- 4:07:51here. So, I'm going to select okay. It's
- 4:07:53telling me I'm thinking because I'm in
- 4:07:55working in a virtual machine with
- 4:07:56parallels that I need to manage my
- 4:07:58unsafe repositories. You may not have
- 4:08:00that popup, but anyway, I selected it
- 4:08:02and moved on. Now, we're going to be
- 4:08:05committing this as their changes and
- 4:08:08then from there pushing it to GitHub.
- 4:08:11So, I'm just going to enter a message in
- 4:08:13here. I'm going to enter in something
- 4:08:14original like first commit and then
- 4:08:16click commit. There's a popup and says
- 4:08:19there are no stage changes to commit.
- 4:08:21Okay. Would you like to stage all
- 4:08:23changes and commit them directly? For
- 4:08:25this, I will have this set to always. I
- 4:08:28always want to do this. Now, you may get
- 4:08:31this error right here. Make sure you
- 4:08:32configure your username and user email
- 4:08:35in Git. This is really common. So, what
- 4:08:37I'm going to do is I'm going to cancel
- 4:08:39out of this. And then from there, in the
- 4:08:41search menu, I'm going to go enter git.
- 4:08:43and we're going to go to get bash, which
- 4:08:45is actually an app that we installed
- 4:08:47when we installed git. You're going to
- 4:08:49type in this get config--global
- 4:08:53user.name Luke Bruce. So, we just set
- 4:08:56our name. We now need to set our email.
- 4:08:58So, then we're going to run get
- 4:09:00config--global
- 4:09:02user.mail and then in double quotes your
- 4:09:06email and then press enter. Now, back
- 4:09:08here in VS Code, it's going to say, hey,
- 4:09:10I want to publish the branch. and it's
- 4:09:12going to take you through. There's a
- 4:09:14little bit of a issue or a flaw with VS
- 4:09:16Code. It's going to try to take you
- 4:09:17through going through and setting up the
- 4:09:18repository again. Say, "Hey, you've set
- 4:09:20this up already. It already exists." So,
- 4:09:22we got to do a little bit more
- 4:09:24interaction with the terminal. In order
- 4:09:26to do this, we're going to come up to
- 4:09:28the file menu and go into terminal and
- 4:09:30select, hey, we want a new terminal. And
- 4:09:32we're going to run this command, get
- 4:09:35remote add origin. And it's really
- 4:09:39important that we have the correct link
- 4:09:41of where your dashboard is on GitHub.
- 4:09:45Specifically, it should be github.com
- 4:09:48your username and then the name of our
- 4:09:50dashboard and then.get. Go ahead and
- 4:09:53click enter. So, I did some changes up
- 4:09:55here. Let's try this again. I have a
- 4:09:57popup here to I don't know why it's
- 4:09:59super small like this. I got a popup
- 4:10:01here and it says sign in with your
- 4:10:02computer. It asks if I want to authorize
- 4:10:04the Git ecosystem. I in fact do. And it
- 4:10:07looks like everything from VS Code is um
- 4:10:10sent up there. So now inside of GitHub I
- 4:10:14can go here on the right hand side if I
- 4:10:15go to your repositories I can see that
- 4:10:18my PowerBI dashboard is there that
- 4:10:21folder and it has everything all the
- 4:10:23folders and files that we had along with
- 4:10:26our readme that we created with all the
- 4:10:28different information in it. It's all
- 4:10:30there. All right. There's only two steps
- 4:10:32left and they're both on LinkedIn. The
- 4:10:34first is navigating down to your project
- 4:10:35section and adding in this new project.
- 4:10:37In here, I might give it a name, a short
- 4:10:39description. I'm going to list some of
- 4:10:41the key skills. You can list up to five,
- 4:10:42but make sure you're calling out PowerBI
- 4:10:44specifically. Also call it gout git and
- 4:10:46GitHub. Adding media is probably the
- 4:10:48most important part. And that's for we
- 4:10:50want to include a link to our GitHub
- 4:10:53repo right here. Once that media is
- 4:10:54added, just select a start and end date.
- 4:10:56And then from there, go ahead click
- 4:10:58save. Last main portion is now making a
- 4:11:01post in it. Feel free to call out myself
- 4:11:04and Kelly. I love checking out all your
- 4:11:06different projects. And then also share
- 4:11:09that link to it. I included also a
- 4:11:11picture to make it a little more
- 4:11:12interactive. And go ahead and post it.
- 4:11:15All right. So, you've made it this far
- 4:11:16in this video of sharing the dashboard.
- 4:11:18Congratulations. Sharing it, especially
- 4:11:21GitHub, especially the first time, is
- 4:11:23intimidating, but I promise you, the
- 4:11:25more and more familiar you get with it,
- 4:11:26the easier it becomes. And it's my
- 4:11:29recommended choice, this method of
- 4:11:31sharing that I use for sharing any type
- 4:11:34of work, whether it's PowerBI, Python,
- 4:11:36SQL, or whatnot. All right, in the next
- 4:11:38video, we're going to be jumping
- 4:11:39straight into more of an advanced
- 4:11:41section, jumping into Power Query, so we
- 4:11:43can see how to clean up some data. With
- 4:11:45that, I'll see you there.
- 4:11:51All right, welcome to the second half of
- 4:11:54this course and we're about to crank
- 4:11:56things up a notch. Specifically, we have
- 4:11:59two chapters left. This one on Power
- 4:12:02Query and the next one on DAX. Both of
- 4:12:05these are going to supercharge your
- 4:12:08powers and PowerBI in order to make more
- 4:12:11effective visualizations. Anyway, into
- 4:12:14this chapter. This one's going to be
- 4:12:15focused on Power Query. Power Query is a
- 4:12:19tool used for ETL or extract, transform,
- 4:12:23and load. You hear data engineers talk
- 4:12:25about this all the time. Let's demo a
- 4:12:28use case real quick. So, back to my old
- 4:12:30days working as a data analyst. Every
- 4:12:32month, I'd get a new report similar to
- 4:12:34this where in this case, that's the job
- 4:12:36postings, but this is for all the job
- 4:12:39postings in January. So, like any good
- 4:12:41employee, I then take that Excel sheet
- 4:12:43for my boss and put it into a PowerBI
- 4:12:46dashboard. this case, I have a job count
- 4:12:48and then also the jobs overtime in
- 4:12:50January. But then we get into our next
- 4:12:52month and February rolls around and I
- 4:12:54get this new Excel spreadsheet that we
- 4:12:56can tell by job posted date has the jobs
- 4:12:58from February 2024. What the heck am I
- 4:13:01supposed to do now? Well, I know what a
- 4:13:03lot of you done before because I've done
- 4:13:05it too. I've had to collect all this
- 4:13:07different data and specifically copying
- 4:13:10it using control C and then navigating
- 4:13:13into my January file, scrolling all the
- 4:13:16way to the bottom and then putting this
- 4:13:19data in here inside of here, saving it,
- 4:13:23and then going back into my PowerBI file
- 4:13:25and clicking refresh now that that
- 4:13:27January file is or that former January
- 4:13:30file is now January February. So I can
- 4:13:32get this new data in. And then these
- 4:13:34jobs are now updated to include not only
- 4:13:36January but also February. Also got to
- 4:13:38update this title. But our data is now
- 4:13:40updated. Mind you, I have to do that
- 4:13:42copy from that other file to the new
- 4:13:44file. If only there was an easier
- 4:13:46solution. Well, with Power Query, there
- 4:13:48is. All I have to do is put a folder
- 4:13:52with the Excel files I need. So in this
- 4:13:54case, I have the January and February.
- 4:13:57Let's now add in March. So I'll paste it
- 4:13:59in. And now we have three months worth
- 4:14:01of data. Whenever I go back to PowerBI,
- 4:14:04click refresh. In this case, I've set it
- 4:14:06up to now pull from this folder. You
- 4:14:08didn't see this. I'll show this in the
- 4:14:10video. And now these files are updated
- 4:14:13for actually just go up to make this a
- 4:14:14little bit easier. They're updated for
- 4:14:16January, February, and also March. Now,
- 4:14:20you may be like, Luke, you still had to
- 4:14:21click that refresh button. Well,
- 4:14:23actually, if you put it into something
- 4:14:24like the PowerBI service using publish,
- 4:14:26you can schedule automated refreshes.
- 4:14:29But we're getting ahead of oursel.
- 4:14:33So, just make sure we're on the same
- 4:14:35page. What is Power Query? Like I said,
- 4:14:37it's an ETL tool in order to form
- 4:14:40extraction, transformation, and loading.
- 4:14:43In that previous example, we extracted
- 4:14:46data out of a folder. We transformed it
- 4:14:49by putting it all into a single table
- 4:14:53and then loaded it here into power query
- 4:14:56or into PowerBI so we could visualize
- 4:14:58it. ETL you access power query inside of
- 4:15:03PowerBI
- 4:15:04underneath the home tab. Basically this
- 4:15:06entire section right here on data and
- 4:15:08also queries. This is Power Query. Fun
- 4:15:12fact, if you're inside of Excel, you
- 4:15:14would just navigate to the data tab. And
- 4:15:17there, like right here on get and
- 4:15:19transform data and queries and
- 4:15:20connections. This is the portion that
- 4:15:22deals with Power Query. Everything that
- 4:15:25you're going to learn from me today in
- 4:15:27using Power Query inside of PowerBI is
- 4:15:30going to be able to replicated and used
- 4:15:32inside of Excel. So, this chapter on
- 4:15:36Power Query is going to be broken up
- 4:15:38into six different lessons. In this
- 4:15:40lesson, we're going to have an intro, do
- 4:15:41some basic examples, and then next one,
- 4:15:43we're going to get into using basically
- 4:15:45another guey called the Power Query
- 4:15:47Editor in order to edit our
- 4:15:49transformations. In the third lesson,
- 4:15:51we're going to be moving into actually
- 4:15:52importing in the data we're going to be
- 4:15:54using for the final project. And then
- 4:15:56from there, with the three remaining
- 4:15:58lessons, we're going to get into some
- 4:16:00more advanced techniques and using
- 4:16:02things like the M language, append, and
- 4:16:04merge, and whatnot. Now, regarding the
- 4:16:06PowerBI files for this chapter, things
- 4:16:08are going to be a little bit different
- 4:16:10from what we did previously. In this,
- 4:16:12we're going to have a file for each
- 4:16:15lesson. These files are going to be what
- 4:16:18is done upon completion of a lesson. So,
- 4:16:22in our case, 3.1 Power Query Intro. This
- 4:16:26is the completed file at the end of this
- 4:16:30video.
- 4:16:33and using those files. It's actually a
- 4:16:35great segue into getting into how to use
- 4:16:38Power Query inside the home ribbon. Now,
- 4:16:41if you were to open up this Power Query
- 4:16:43intro file and then were to hit
- 4:16:46something like refresh in order to
- 4:16:48connect to all these different data
- 4:16:49sources that we are going to do and try
- 4:16:51to load them in, you're going to get a
- 4:16:53few errors. Specifically with our
- 4:16:56monthly files, these are located on my
- 4:16:59local machine. So the path for these is
- 4:17:03in power query is directing them to my
- 4:17:05machine. You need to update them from
- 4:17:07where they are for you. So I'm going to
- 4:17:09do is close this. Go here underneath the
- 4:17:13queries under transform data into data
- 4:17:16source settings. In our case, you're
- 4:17:18going to look for the folder icon, in
- 4:17:20this case the Z desktop monthly files,
- 4:17:22and you're going to go to change source.
- 4:17:25And then from there, you're going to go
- 4:17:26to browse and you'll locate to the area
- 4:17:28that you have those monthly files in.
- 4:17:31Click okay and okay and then close. And
- 4:17:33then upon refreshing this, the query
- 4:17:36should load with no issues. And bam,
- 4:17:40there we have it. Anyway, so this is a
- 4:17:41completed file. Let's get out of this
- 4:17:43and get into a blank PowerBI file to get
- 4:17:45through this lesson. So moving on into
- 4:17:47exploring this, the first thing to
- 4:17:49understand is we have an option to get
- 4:17:51data. And this gets data from a
- 4:17:53multitude of different sources. As we've
- 4:17:55saw previously, I prefer using this more
- 4:17:59option anytime I'm trying to look for
- 4:18:01things. There's some major types that we
- 4:18:03can look at. One is file things like
- 4:18:06Excel, text files, PDFs, whatnot. The
- 4:18:09next are databases, which we're going to
- 4:18:12eventually get to demoing for this. And
- 4:18:14databases are by far, especially in the
- 4:18:17business world, are the source that I'm
- 4:18:20going to be using to get data primarily
- 4:18:23behind files themselves, like Excel
- 4:18:25files. Now, beyond file and databases,
- 4:18:27there's options that are specific to the
- 4:18:30Microsoft platform that if your
- 4:18:32company's invested billions or millions
- 4:18:34of dollars into this, they probably have
- 4:18:36access to these, such as Azure as well.
- 4:18:39And the only other other one we'll call
- 4:18:40out is other, specifically other because
- 4:18:43we're going to be able to import data
- 4:18:44from things like a web page or you can
- 4:18:46even do things like R script or Python
- 4:18:48script. Now, navigating back now that
- 4:18:50we've seen all that, you can see that
- 4:18:52these three options right here are
- 4:18:54basically just quick actions from the
- 4:18:57get data. So, I don't find myself using
- 4:18:59unless I'm going directly to like an
- 4:19:00Excel workbook. We've seen previously
- 4:19:02also how we can just enter data in and
- 4:19:05create our own table. That's done
- 4:19:07through Power Query. And then once again
- 4:19:09data versse is another source or recent
- 4:19:11sources itself you can connect right to.
- 4:19:13Now moving over to this query section
- 4:19:15under transform data. We've explored
- 4:19:17data source settings. But then there's
- 4:19:19transform data and this is how we're
- 4:19:21going to get to the power query editor.
- 4:19:24We're not going to touch this editor in
- 4:19:26this first lesson. We're going to keep
- 4:19:27it simple and just load data using the
- 4:19:30most simple method to get into PowerBI
- 4:19:32without getting to the editor. The last
- 4:19:34two things on here that are grayed out
- 4:19:36are edit uh parameters and also edit
- 4:19:39variables. Both of these are outside of
- 4:19:42the scope of this course. Editing
- 4:19:45parameters and variables are more
- 4:19:48advanced techniques and I don't think
- 4:19:50that they're necessarily necessary for
- 4:19:52the basics. So, we're not going to be
- 4:19:53covering it. And the last button is
- 4:19:55refresh, which you've seen me demo just
- 4:19:57recently of getting those monthly files
- 4:19:59updated. But that's how we update any
- 4:20:01type of query. is clicking refresh.
- 4:20:05All right, enough of the theory. Let's
- 4:20:07actually get into some examples
- 4:20:09demonstrating power query. First one is
- 4:20:11this. Now, let's say I want to do an
- 4:20:14analysis to understand how things like
- 4:20:16GDP, gross domestic product compares to
- 4:20:20or how it has an impact on maybe
- 4:20:22salaries in different countries. And so
- 4:20:25what I can do is I went to Bing here. I
- 4:20:27uh binged if you will countries by GDP
- 4:20:30by sector and this first result of
- 4:20:33Wikipedia popup. Anyway, this Wikipedia
- 4:20:37page includes tables in it with in this
- 4:20:40case it's the nominal GDP and then also
- 4:20:43this real GDP. Anyway, this data is in
- 4:20:45here in a table. Previously, I know
- 4:20:49you've probably done this before. You
- 4:20:50probably come in here and tried to
- 4:20:52select it and then try to copy it. Well,
- 4:20:55instead power query simplifies this. I
- 4:20:57can just copy this address right here.
- 4:20:59Pressing C and then navigating to get
- 4:21:03data and we want to get this from this
- 4:21:05web source right here from a web page.
- 4:21:08We'll keep it in the basic. All we have
- 4:21:09to do is just paste in that URL. Click
- 4:21:12okay. And what's really neat now is it
- 4:21:15shows me all the different tables within
- 4:21:18here. I can even select like table two,
- 4:21:20which is the one we're going to get.
- 4:21:22Anyway, it's really important that you
- 4:21:23go through and select which table you
- 4:21:24actually want because a lot of these
- 4:21:26tables are not really useful. Table 2 is
- 4:21:28the most useful for us. I'm going to
- 4:21:30select this and then there's three
- 4:21:32options down there. Load, transform
- 4:21:35data, and cancel. If I click transform
- 4:21:37data, what's going to happen is it's
- 4:21:40going to take me into the Power Query
- 4:21:42editor itself. And it's not a big deal
- 4:21:45if you did this. You can just go ahead
- 4:21:46click close and apply. Now, the other
- 4:21:48option instead of hitting transform data
- 4:21:51is just clicking load. And this
- 4:21:53basically bypasses going into that power
- 4:21:56query editor and just loads it directly
- 4:21:59into here as it's doing now. And then
- 4:22:01bam, we have this table inside of here.
- 4:22:04All the different fields. I can inspect
- 4:22:05it inside the table view. And all the
- 4:22:08columns look like they're coming up
- 4:22:10correctly. I am going to rechange the
- 4:22:12name of this to GDP nominal. And then
- 4:22:15updating it there. It's also going to
- 4:22:16update it inside the data pane. So now I
- 4:22:18can make something like a map visual,
- 4:22:20throw in the country into the location,
- 4:22:22and then for the bubble size, put in
- 4:22:24that total GDP. I could also just
- 4:22:26duplicate this bad boy and make it into
- 4:22:28a stacked bar chart. In this case, the
- 4:22:30world is well everything for it. So in
- 4:22:34this visual itself, I could do something
- 4:22:35like just filter out world by unchecking
- 4:22:38it and bam. Pretty crazy how we can just
- 4:22:41now get this data from online directly
- 4:22:44into our PowerBI file and then next year
- 4:22:47or then the following year whenever this
- 4:22:48data updates all we got to do is go and
- 4:22:50click refresh assuming the table name
- 4:22:53doesn't change it will go forward with
- 4:22:55refreshing and getting that updated
- 4:22:57data.
- 4:23:00Now, let's get into demoing how we can
- 4:23:03connect to a data source such as a
- 4:23:05folder as we did in that first exercise
- 4:23:08in this video. For this, I'm going to
- 4:23:09start a new page that we can build any
- 4:23:11visualizations on. And we're going to go
- 4:23:13into get data. And for this, I'm going
- 4:23:15to go to more. And inside of here, I'm
- 4:23:18going to type in folder. Now, there's
- 4:23:20actually two options for folder. Folder
- 4:23:22itself, which is a folder on your local
- 4:23:24machine, and SharePoint folder. If
- 4:23:26you're using the Microsoft ecosystem,
- 4:23:28this is what I've used in the past where
- 4:23:31basically I've had another stakeholder
- 4:23:32that was in charge of the data and they
- 4:23:34were just in part in charge of putting
- 4:23:36the data into the SharePoint folder and
- 4:23:38then in PowerBI service it would
- 4:23:39automatically update from there. We're
- 4:23:41not going to be working with SharePoint
- 4:23:42folder because I'm assuming you don't
- 4:23:43have access to it. I don't even have
- 4:23:45access to it. For this exercise, we're
- 4:23:47going to be using the data folder,
- 4:23:49specifically these monthly files.
- 4:23:52Remember, we have files broken up for
- 4:23:54the same data broken up over every
- 4:23:56single month. Anyway, for this example,
- 4:23:58I'm going to start by only uploading
- 4:24:00these first three months. So, I'm going
- 4:24:02to just move these other ones out. Put
- 4:24:04them on my desktop for now. And I
- 4:24:06thought it was going to delete it for it
- 4:24:07moved it out of there. Apparently, it
- 4:24:09doesn't. So, I'm going to delete it by
- 4:24:10right clicking, select delete. Yes, I
- 4:24:13want to delete cuz I have copies on my
- 4:24:14desktop. All right, let's get into
- 4:24:16importing in this folder. So, I'm going
- 4:24:18to go into folder and click connect.
- 4:24:20From there, you're going to navigate to
- 4:24:22where the folder is with the correct
- 4:24:24path in there. I'm going to click okay.
- 4:24:25And then we have this navigator window
- 4:24:27pop open. And in this, we can see
- 4:24:30basically the rows here are outlining
- 4:24:34the three separate files or three Excel
- 4:24:37files that we have in there, right?
- 4:24:39Because if I navigate to that folder on
- 4:24:41my desktop, I see that yeah, it does
- 4:24:44match those three files. But how we're
- 4:24:46going to combine it? Well, we'll get to
- 4:24:48that. Anyway, we've gone over these
- 4:24:49buttons before. of transform data,
- 4:24:52right? Because if we've transformed it,
- 4:24:54we're going to enter the power query
- 4:24:55adder. They also have this load. If we
- 4:24:57were to click load, which is not
- 4:24:59actually what we want to do, it's going
- 4:25:00to load all these monthly files in. But
- 4:25:03this is going to be basically in a
- 4:25:04table, meaning navigating to the table
- 4:25:06view, it just tells us about the Excel
- 4:25:08file. It doesn't give us the data. It
- 4:25:10didn't combine it. So, I'm actually
- 4:25:11going to just go ahead and delete this
- 4:25:14from model and start over again. And
- 4:25:16then back to navigating through all
- 4:25:18those steps to load it in. In this case,
- 4:25:20I'm not going to do load or transform.
- 4:25:22I'm going to go into combine. And then
- 4:25:23it says, hey, you can combine and
- 4:25:26transform data or combine and load data.
- 4:25:28Like I said, we don't want to get I'm
- 4:25:29not going into the Power Query out of
- 4:25:30this lesson. So, we're just going to go
- 4:25:31to combine and load. Now, there's a
- 4:25:34couple more steps we have to navigate
- 4:25:35to. We need to select the object to be
- 4:25:38extracted from each file. In this case,
- 4:25:41we're going to collect uh select this
- 4:25:42sheet one and it's using the first file.
- 4:25:46We could also call out a specific one
- 4:25:48like I could call out January in this
- 4:25:50case and click this as well. I recommend
- 4:25:53just doing first file in case January
- 4:25:55ever gets replaced. So, I'm going to go
- 4:25:57ahead and change it. Select sheet one
- 4:25:59and then select okay. And now it's going
- 4:26:03through the mo loading process of
- 4:26:05accessing each of these monthly files.
- 4:26:07As you see, it did March, February, and
- 4:26:09now January. Inspecting the monthly
- 4:26:11files underneath the table view. I can
- 4:26:13see that it looks like we have 156,000
- 4:26:16rows, which sounds about right. So to
- 4:26:17visualize it, I create a stack bar
- 4:26:19chart, put job title short into the
- 4:26:21y-axis, and then the count of job title
- 4:26:24short into the x-axis. But let's
- 4:26:26actually view this over time. time. So,
- 4:26:28I'm going to insert in a line chart and
- 4:26:29we'll throw job posted date into the
- 4:26:31x-axis and then count into the y-axis.
- 4:26:34If you notice from this, this count is
- 4:26:37this this line chart is just okay, this
- 4:26:40is a mess to look at. And the problem is
- 4:26:42that that job posted date is not in a
- 4:26:47date format. We can actually fix this in
- 4:26:50power query editor. Like I said, we're
- 4:26:52staying out of that today. So for the
- 4:26:54time being I'm just going to select this
- 4:26:56and change the format to a data type of
- 4:26:59date time says hey do I want to change
- 4:27:02this? Yeah I want to change it. It'll
- 4:27:03say hey one or more calculate objects
- 4:27:05need to be manually refreshed. Refresh
- 4:27:07them now. And now I'm going to X out of
- 4:27:09this with job post to date. As we can
- 4:27:11see job posted date now has a date
- 4:27:13hierarchy. So whenever I drag it onto
- 4:27:15here it's aggregating it by day and by
- 4:27:18month and by year. So drilling on down I
- 4:27:22like this day view. This is good. Now,
- 4:27:24what happens if we get more files? Well,
- 4:27:27whenever we add them into here, they're
- 4:27:30now in this folder, but this this still
- 4:27:32needs to refresh, right? So, remember,
- 4:27:34we have to still click refresh all
- 4:27:36tables, and it's going to go into
- 4:27:38monthly files, specifically into the
- 4:27:40queries. And in this case, it's going to
- 4:27:42access each of those. Right now, it's
- 4:27:44August, November, May. And then we have
- 4:27:47all of it for the year. And this is just
- 4:27:49unreadable. some navigate up one and
- 4:27:51we'll be able to see it on a monthly
- 4:27:53basis. Now,
- 4:27:56the last example we're going to get to
- 4:27:58is like I said the most real world
- 4:27:59example of connecting to a database.
- 4:28:02Specifically, we're going to get and
- 4:28:04connect to the database behind data.te.
- 4:28:08This app, which has collected up to 3.6
- 4:28:11million jobs at the time of filming
- 4:28:14this, has all of this in a database.
- 4:28:16Specifically, it's a big query database.
- 4:28:19Actually, just to prove that I have
- 4:28:20access to it, here I am inside of my
- 4:28:22Google Cloud account. I'm connected to
- 4:28:25the table itself. Here's all the
- 4:28:27different columns. Has a lot more
- 4:28:28columns than you're used to seeing.
- 4:28:30Anyway, the details inside of it. It has
- 4:28:323.6 million rows inside of it. I can
- 4:28:35also, if I wanted to, see a preview of
- 4:28:37the data within it. Anyway, we're going
- 4:28:39to use Power Query to connect to this
- 4:28:43online database. And by we, I mean me.
- 4:28:46Unfortunately, it would cost entirely
- 4:28:48too much money to try to get everybody
- 4:28:49in account access. Also, I'd have to pay
- 4:28:51for the resources for everybody
- 4:28:52accessing it. It just be a giant
- 4:28:54headache. Sorry, it's only going to be
- 4:28:55me. Anyway, I'm going to click get data
- 4:28:57and then more. And then from there,
- 4:28:59you're going to search for whatever
- 4:29:00database you have it in. In my case, I
- 4:29:02use BigQuery. So, I'm going to select
- 4:29:04BigQuery and select connect. From there,
- 4:29:07I'm going to specify all of my
- 4:29:08connection information. I can also give
- 4:29:11a SQL statement if I want to get maybe a
- 4:29:14subset of the data. Now, what you didn't
- 4:29:16see prior to this is I actually had to
- 4:29:19go through log into Google and provide
- 4:29:22my credentials to access it. So, there
- 4:29:24is another step to get to to make sure
- 4:29:26that just nobody can access your
- 4:29:28database. Anyway, I navigated into the
- 4:29:30table itself and looking at it, it looks
- 4:29:33like it's right. I could verify by going
- 4:29:36back to BigQuery, checking it out and be
- 4:29:37like, "Yeah, that matches the columns."
- 4:29:39And then from there, we have options of
- 4:29:41load, transform data, i.e. open the
- 4:29:44power query editor or cancel. I'm just
- 4:29:46going to load it in. Now, this is
- 4:29:48something new that we haven't covered
- 4:29:50yet. And it's asking me how do I want to
- 4:29:53basically bring all this data in. Do I
- 4:29:55want to import it or do I want to direct
- 4:29:58query it? Now, in all of our previous
- 4:30:01example, we've always used import mode.
- 4:30:04But we've never been given the option to
- 4:30:05do direct query. And import mode just
- 4:30:08means we import in all the data. Now
- 4:30:11direct query does not import it in
- 4:30:13meaning the file size is much smaller.
- 4:30:15The PowerBI file size is much smaller.
- 4:30:17And then every time that you want to
- 4:30:19maybe update a visualization, it has to
- 4:30:21go out and get that data. So therefore
- 4:30:23with performance for import mode, it's
- 4:30:25very fast. For direct query, super slow
- 4:30:28depending on how big the data source is.
- 4:30:30Import mode supports basically all our
- 4:30:32different functionality. Yes, you have
- 4:30:34to manually refresh inside the PowerBI
- 4:30:36app, but you can also set that up in the
- 4:30:38service. Direct query doesn't support
- 4:30:41other advanced features such as like
- 4:30:43accessing this data while you're offline
- 4:30:45or supporting full DAX, which we'll be
- 4:30:47demonstrating in chapter 4. Anyway, the
- 4:30:49point is you have to raise your costs
- 4:30:50and your benefits of what you want to
- 4:30:52actually accomplish with this. I have
- 4:30:543.6 million rows of data to get into
- 4:30:57here. that would make this a heck of a
- 4:30:59size of a file and so I'm okay with
- 4:31:02being a little bit slower and I'm going
- 4:31:04to go with direct query. Now let's get
- 4:31:06into inspecting it. If I wanted to or
- 4:31:09what I can't actually do if I went to
- 4:31:11table view I can't view it because it's
- 4:31:14not an import mo mode. It's in that
- 4:31:16direct query. So unfortunately
- 4:31:17everything I want to view from it I have
- 4:31:18to do from the canvas. So I select a new
- 4:31:21card and I'm going to drag the job ID
- 4:31:23into the fields. And specifically I want
- 4:31:25a count of this. And this tells me I
- 4:31:28have 3.65
- 4:31:30million jobs. Let's add a few more
- 4:31:32visualizations. And bam, we get this bad
- 4:31:34boy. So, I'm able to look at all the
- 4:31:37different values we've looked at
- 4:31:38previously.
- 4:31:40But I will show something with this. If
- 4:31:41I'm trying to actually cross filter, in
- 4:31:43this case, I selected software engineer.
- 4:31:46You can see everything is going through
- 4:31:47and trying to load with 3.6 million rows
- 4:31:51in a database. This is going to take a
- 4:31:53little bit of time. And it looks like
- 4:31:55it's finally updated. I still have one
- 4:31:56more. Okay, everything's now loaded.
- 4:31:58Now, if I wanted to at any point, if I
- 4:32:00wanted to switch this from that direct
- 4:32:02query into import mode, I could come
- 4:32:04down here to storage mode and say, "Hey,
- 4:32:07switch all tables to import." Once you
- 4:32:09do this though, you can't revert back to
- 4:32:12the direct query. Now, with direct
- 4:32:15query, we were able to load this in. You
- 4:32:18mean you saw how fast we went through
- 4:32:19the data source. I'm going through right
- 4:32:21now, and it's loading in the rows. Look
- 4:32:23at this. is at 350,000
- 4:32:25and we still have to get to 3.6 million.
- 4:32:28Also, we're still loading the data. So,
- 4:32:30the file hasn't updated uh necessarily
- 4:32:32just yet, but just for reference to
- 4:32:34remember this, right, the data size of
- 4:32:36the file right now is at 11 megabytes.
- 4:32:39And we're still loading. And it looks
- 4:32:43like we're wrapping up these rows of
- 4:32:45this database. All right. So, truth be
- 4:32:48told, I got done with or was getting
- 4:32:50close to loading and that file end up
- 4:32:51crashing. I didn't want to go through
- 4:32:53that reload process again. So, I opened
- 4:32:54an old file that I worked with
- 4:32:56previously. This one is connected with
- 4:32:59direct import to that database. This one
- 4:33:02only has 3.49 million cuz I did this a
- 4:33:04month ago. Anyway, it still has all the
- 4:33:07data inside of here. But notice how fast
- 4:33:10whenever I actually click this, how fast
- 4:33:12it actually filters down because it's
- 4:33:13imported in. Now, there's a major
- 4:33:16drawback from that. Remember, our
- 4:33:17previous file was only 11 megabytes.
- 4:33:21This bad boy is 2500
- 4:33:24megabytes.
- 4:33:26So nearly 200 times bigger. So importing
- 4:33:30a database isn't necessarily as simple
- 4:33:33as importing a database cuz sometimes
- 4:33:35you have to decide if you're going to
- 4:33:36use import mode or direct query. How's
- 4:33:38it going to affect a performance or how
- 4:33:40that's going to affect file size. My
- 4:33:42recommendation is you just use import
- 4:33:44and if you can clean up your data into
- 4:33:47as smallest size as possible before
- 4:33:50actually bring it into PowerBI. If
- 4:33:52that's not an option, go with direct
- 4:33:53query. All right. So, now that we have
- 4:33:55that in-depth coverage of how we can
- 4:33:57import databases, but also other data
- 4:34:00sources as well, we now have some
- 4:34:01practice problems for you to go through
- 4:34:03and connect to some other different data
- 4:34:06sources as well. With that, in the next
- 4:34:08lesson, we're going to be jumping into
- 4:34:09the Power Query editor. See you there.
- 4:34:15Now that we're master at understanding
- 4:34:17what are all the different types of data
- 4:34:19sources we can connect to. Now let's
- 4:34:22jump into the Power Query editor itself
- 4:34:25and actually get to cleaning up some
- 4:34:26data. Now in this video we're going to
- 4:34:29be performing cleanup of our CSV file
- 4:34:32that we've previously been using and
- 4:34:34we're going to do that with the Power
- 4:34:35Query editor while exploring it. Anyway,
- 4:34:37the first case we're going to take
- 4:34:38advantage of, as we saw previously, that
- 4:34:41job posted date time. Whenever we drag
- 4:34:44it into a line chart, it doesn't do it
- 4:34:47because the data wasn't correct in being
- 4:34:50in a hierarchy or recognizes date time
- 4:34:52as it was here. Demoed that in the last
- 4:34:54lesson. Anyway, we're going to use Power
- 4:34:56Query to actually clean up this column.
- 4:34:59The other thing we're going to do, which
- 4:35:00is quite common with Power Query, is
- 4:35:02create new columns that we can then
- 4:35:05analyze further with. Specifically here,
- 4:35:08we're going to be analyzing a column
- 4:35:10called salary hour adjusted. And that
- 4:35:12adjusted column is going to take our
- 4:35:14salary hour average column and multiply
- 4:35:17it times 2080 or basically 40 hours
- 4:35:21times 52 weeks in a year. And therefore
- 4:35:23we can understand what would be the
- 4:35:26yearly salary based on an hourly pay.
- 4:35:29Anyway, we're going to make these charts
- 4:35:30associated with it. And this allows us
- 4:35:32now to compare yearly median salary to
- 4:35:36now hourly adjusted salary like we're
- 4:35:39doing in this line chart.
- 4:35:43So let's not get ahead of oursel. We're
- 4:35:44going to get an intro now into the Power
- 4:35:45Query editor. And for this lesson, feel
- 4:35:48free to just start a new blank report.
- 4:35:51Inside out of our new file, let's
- 4:35:53connect to our previous CSV that we've
- 4:35:56been using. Selecting this of text CSV
- 4:35:58and then navigating to the data source
- 4:36:00itself of job postings flat. Select
- 4:36:02open. Inside the navigator window,
- 4:36:05remember we don't want to go to load. We
- 4:36:06want to actually we're going to explore
- 4:36:07the power query editor itself. So we're
- 4:36:09going to go into transform data. So,
- 4:36:11let's go over this UI of this Power
- 4:36:14Query editor that just opened up. It has
- 4:36:17a very similar format to all Microsoft
- 4:36:20products in that up at the top, we have
- 4:36:23the ribbon itself. Then underneath this,
- 4:36:26we have the data view area. And it may
- 4:36:29be confusing to some cuz it looks like
- 4:36:31it's Excel, but I can't go in here and
- 4:36:33like try like I'm trying to I can't type
- 4:36:36inside of here. This is just showing me
- 4:36:38what is the current view view of the
- 4:36:41query that we're operating on. So this
- 4:36:43has all the different columns of our
- 4:36:46final data set. With this we have a
- 4:36:49queries pane over to the left hand side.
- 4:36:51So we're currently operating on the job
- 4:36:54postings flat query which is this query.
- 4:36:57Conveniently they just named it this
- 4:36:58based on our CSV. And then over here on
- 4:37:01the right hand side is our query
- 4:37:03settings. And notice here, so we have
- 4:37:06our name right here. If I wanted to, I
- 4:37:08could name it to just job postings.
- 4:37:10Click enter. And then our query itself
- 4:37:12updates that. I want job postings flat,
- 4:37:15so we're going to leave it as that. And
- 4:37:16then underneath this, we have what steps
- 4:37:19were applied in Power Query for this. So
- 4:37:22I can actually go back into previous
- 4:37:25steps. Right now, we're on change type.
- 4:37:27That's the last and most recent step. I
- 4:37:30can go to promoted headers. And in this
- 4:37:32one, there's not really much of a
- 4:37:33difference. But if I go into the source
- 4:37:36step, we can actually see that from the
- 4:37:39source itself, it imported in and those
- 4:37:41job titles or sorry the uh actual column
- 4:37:45headers were on row one. So that's why
- 4:37:48it went through once it did the source,
- 4:37:50then it went into promoted headers and
- 4:37:52then finally into change type. Sometime
- 4:37:54to access the properties within here,
- 4:37:57you need to click this settings icon. So
- 4:38:00in the case of the promoted headers, I
- 4:38:01would click this and then I could select
- 4:38:04different options. We're not going to
- 4:38:06change anything for these so far. All
- 4:38:08right. So that's the main portions of
- 4:38:10this. One last thing to call out after
- 4:38:12this query setup now that we've seen it.
- 4:38:14Notice there's a formula bar up here.
- 4:38:17And if I go to this like change type,
- 4:38:19the formula inside of here actually
- 4:38:22changes. Anyway, this itself inside of
- 4:38:25here is what's called the M language.
- 4:38:28Power Query has a special language
- 4:38:30that's put together to basically compile
- 4:38:33all the different steps to build this
- 4:38:35query. If I wanted to go check it out, I
- 4:38:37can go into this advanced editor up here
- 4:38:39and this is the full query for this
- 4:38:43actual data set or this query. But once
- 4:38:46again, we're getting ahead of oursel.
- 4:38:50So, we're going to start with a going
- 4:38:51over the view tab first. And it's
- 4:38:53important for that because sometimes
- 4:38:56people think that, oh, I'm doing edits
- 4:38:58in here. I can't actually evaluate and
- 4:39:01find out what's going until I go back to
- 4:39:03the home tab and then close and apply to
- 4:39:06therefore load it into PowerBI. But
- 4:39:10actually with this view tab, we can do a
- 4:39:14lot of analysis here and prevent us from
- 4:39:17having to jump back and forth between
- 4:39:19the Power Query editor and the PowerBI
- 4:39:21app. What do I mean by that? Okay. Well,
- 4:39:23let's actually go check out something
- 4:39:24like the job title short column. Now,
- 4:39:27what's really neat about this is we have
- 4:39:30up at the top here some icons that say,
- 4:39:33hey, we have 10 distinct value and zero
- 4:39:35unique. And if you actually count these
- 4:39:37bars, that's the 10 distinct values. And
- 4:39:40we know from exploring the job title
- 4:39:43short column before that if I were to
- 4:39:45actually use this drop- down arrow here,
- 4:39:47there are 10 values in here.
- 4:39:51Specifically, there's 10 different job
- 4:39:53titles. Now, this drop- down arrow, now
- 4:39:55that we have it open, it works similar
- 4:39:58to how you could filter in Excel. I can
- 4:40:00sort ascending, sort descending. I'll do
- 4:40:02sort descending. Right now, it's going
- 4:40:04to go through a load process. And if you
- 4:40:06notice, we have an applied step of
- 4:40:08sorted rows, but now it's uh sorted in
- 4:40:12descending order. And it's now saying
- 4:40:14there's only one distinct value. Why the
- 4:40:17heck is that? Well, let's actually
- 4:40:20inspect this. So, selecting the job tile
- 4:40:22short column using the view tab. What I
- 4:40:25can do here is come up here and select
- 4:40:27something like the column profile. This
- 4:40:30thing is invaluable. Like I said,
- 4:40:33invaluable. I mean, invaluable. Anyway,
- 4:40:35what we find out is, yeah, everything
- 4:40:38the software engineer makes up
- 4:40:39everything. But it says, hey, the
- 4:40:40software engineer makes up 100% but a
- 4:40:42thousand of them are software engineers.
- 4:40:45What's going on is I'm going to actually
- 4:40:46close out of column profiling real
- 4:40:48quick. Column profiling is based on the
- 4:40:50top 1,00 rows at least selected from the
- 4:40:52bottom. What I can do is change this to
- 4:40:56the entire data set. Now, this is going
- 4:40:58to actually have to load more data now
- 4:41:02and so it's going to take some time. So
- 4:41:04that's why by default it's set to a
- 4:41:05th00and values because sometimes it
- 4:41:08takes a while to actually load depending
- 4:41:10on how big the data set is. So it loaded
- 4:41:12and now we can see that this preview
- 4:41:15area shows that there is 10 unique
- 4:41:18values. Whenever I go to column profile
- 4:41:21and actually look inside the job tile
- 4:41:23short column, I can see there's almost
- 4:41:24500,000 jobs here. And we actually see
- 4:41:27all the different jobs, not just those
- 4:41:29software engineers since we had it
- 4:41:30sorted in descending order. And you can
- 4:41:32do this with any column. I can just go
- 4:41:34through here and select different
- 4:41:36columns that I want to actually view. In
- 4:41:39this case, I'm looking at job location.
- 4:41:40I can see that anywhere comprises nearly
- 4:41:4213% of jobs. Some more things to explore
- 4:41:45up here from this view tab. I'm going to
- 4:41:48turn off that column profile. But we
- 4:41:50also have this column distribution
- 4:41:51enabled. I can uncheck that or check
- 4:41:53that. I like to have that visually so I
- 4:41:56don't have to necessarily open the
- 4:41:57column profile to view that. We have
- 4:42:00this of column quality which you can see
- 4:42:03that it tells you which data is valid,
- 4:42:06which one's the error, which one's
- 4:42:07empty. I'm not a fan of this because you
- 4:42:09can actually, if you look up here at the
- 4:42:11top, there's a bar right here that shows
- 4:42:12that. And we can see this a little bit
- 4:42:14more clearly using this these three
- 4:42:16columns here where for something like
- 4:42:18the salary rate or salary year average,
- 4:42:21nearly 96% of them are empty, hence the
- 4:42:24gray bar. And then the other 4% are
- 4:42:28valid. Anyway, this bar is located up
- 4:42:30here. Because of that, I don't really
- 4:42:32care about column quality. The other two
- 4:42:34of monospace just changes the font tape
- 4:42:37or displays or doesn't display whites
- 4:42:38space. I just leave show whites space
- 4:42:40collect. Navigating back over to job
- 4:42:42tile short. Remember, we do have it
- 4:42:45right now sorted. I can tell there's a
- 4:42:46sort on there. I actually didn't want to
- 4:42:49apply that step. If I want to remove a
- 4:42:51step, I just navigate to whatever one,
- 4:42:53in this case, sorted rows, click this
- 4:42:55red X right here, and it gets rid of it.
- 4:42:58I also, it's taking a while for this
- 4:43:00data set to load in between each one.
- 4:43:02So, I'm going to change this column
- 4:43:04profiling back to the top 1,000 rows.
- 4:43:07And with that, the last thing to capture
- 4:43:10on this column distribution, remember we
- 4:43:12talked about here there was 10 distinct
- 4:43:13values and zero unique, which distinct
- 4:43:17means they have repeating values. Unique
- 4:43:20means that there's only that value once.
- 4:43:23So in the case of job location of these
- 4:43:25top 10,00 values, there's 48 distinct
- 4:43:29values, so repeating values, and 277
- 4:43:32unique, but that's only for the top
- 4:43:34thousand.
- 4:43:37Jumping next into the home tab on the
- 4:43:41ribbon. This is where I spend the
- 4:43:43majority of my time selecting different
- 4:43:45options that I want to do with cleaning
- 4:43:47up my data. We're going to be exploring
- 4:43:49all of these features over the course of
- 4:43:51the chapter, but I'm not going to dive
- 4:43:52into each individual one because then
- 4:43:54this video would be too long and you're
- 4:43:55not going to pay attention. So, instead,
- 4:43:57we're just going to highlight key things
- 4:43:59that I'm using very frequently with this
- 4:44:02specifically. If we go over to that job
- 4:44:04posted date column, we can see that it
- 4:44:07is of the date time using this home
- 4:44:09ribbon date time, which if you remember
- 4:44:12from the last lesson, it didn't
- 4:44:14automatically select this because we
- 4:44:16didn't go through the power query editor
- 4:44:17for the transformation. Anyway, not a
- 4:44:19big deal. The main point of showing is
- 4:44:21we can control the data type. And in
- 4:44:23here, it automatically did select job
- 4:44:25posted date as a date time. So, let's
- 4:44:27actually demo a use case where we
- 4:44:29actually change a value. In this case, I
- 4:44:31can select the salary year average
- 4:44:32column. In our case, it is whole number.
- 4:44:36And this value, as we can see here, it's
- 4:44:38like 120,000. We're a salary hour
- 4:44:40average. It is of the data type decimal
- 4:44:43number. And we can see that it actually
- 4:44:45has decimal numbers associated with it.
- 4:44:47If I also want to get salary year
- 4:44:48average into this format, I would just
- 4:44:51click decimal number. And it's asking me
- 4:44:53this important step. Hey, do I want to
- 4:44:54replace the current applied step? So
- 4:44:57this change type or do I want to add a
- 4:45:00new step? Let's do add a new step. Just
- 4:45:03a demo. It adds another step underneath
- 4:45:05here. And all that's done here with this
- 4:45:08change type one selected is a change
- 4:45:11salary year average to type number. Now
- 4:45:14I'm not a big fan of creating additional
- 4:45:17steps in here because there can be times
- 4:45:19where we get to we have 15 or 20 applied
- 4:45:21test sets. We want to minimize this as
- 4:45:22much as possible. So I'm going to click
- 4:45:24X out of this and we're going to do this
- 4:45:26again. with the salary or average column
- 4:45:28selected. Change it to decimal number.
- 4:45:30And in this case, we're going to go
- 4:45:32ahead with replace current and it's
- 4:45:34updated cuz I can see it says decimal
- 4:45:36number up here. Along within this M
- 4:45:38language for the formula bar, it updated
- 4:45:41to the type number. I actually don't
- 4:45:43want this as a decimal. We're going to
- 4:45:44change this back to a whole number.
- 4:45:47We're going to replace current as well.
- 4:45:49and salary year average changed back
- 4:45:52into what it was originally for whole
- 4:45:53number which is this characteristic of
- 4:45:55in64.type type. Not something you need
- 4:45:58to have memorized. I just like to
- 4:46:00sometimes look at the M language,
- 4:46:01understand what's going on there. But
- 4:46:03clearly, we can see from this columns
- 4:46:05are put inside of parentheses and then
- 4:46:08referenced as necessary. So that's the
- 4:46:10home tab. We're going to be going into a
- 4:46:11lot of these other features,
- 4:46:13specifically manage columns, reduce
- 4:46:15rows, and everything else under
- 4:46:16transform and some upcoming lessons.
- 4:46:21Moving into the transform tab here. And
- 4:46:24with this, you're going to see a lot of
- 4:46:25stuff repeated from the home tab.
- 4:46:29Specifically right here, right? I see
- 4:46:31the salary year average. I can control
- 4:46:32the data type from here. Anyway, this
- 4:46:35tab itself, it allows us to do more
- 4:46:38control of how we want to modify a
- 4:46:40column. Let's take for example this job
- 4:46:43via column, which shows us the platform
- 4:46:46in which a job posted was posted on. If
- 4:46:48I inspect it using column profile, I can
- 4:46:51see that these different platforms have
- 4:46:55the word via and then a space in front
- 4:46:58of it. If I'm trying to present this to
- 4:47:00my boss, I really don't want this via
- 4:47:04space in front of it. I just want it to
- 4:47:05say like in this case the second one,
- 4:47:07LinkedIn. Well, that's where the
- 4:47:09transform tab comes to the rescue. With
- 4:47:12job via selected, I can go into replace
- 4:47:15values. Specifically, I want to replace
- 4:47:18via with well with nothing. I'm gonna go
- 4:47:21ahead and click okay. So, this removed
- 4:47:25the via. But if I actually click
- 4:47:28something like this of boingsreveal.com,
- 4:47:31I'd have to actually check out this job
- 4:47:32posting website. Anyway, it shows down
- 4:47:35here at the bottom. But whenever you
- 4:47:37highlight it, what you don't what you do
- 4:47:39see is there's actually some white space
- 4:47:43in front of here. and I highlighted it
- 4:47:45here. What we could do is we could do
- 4:47:47one more step and in this case we want
- 4:47:50to have with the job via column selected
- 4:47:52go to format and I can do things like
- 4:47:55lower cases which is demonstrated here.
- 4:47:57I could even uppercase it make
- 4:47:59everything uppercase. I'm going to
- 4:48:00delete both these steps. It's not what I
- 4:48:02want to do. Instead what I want to do is
- 4:48:04I want to trim it. And now with this
- 4:48:07selected we can see that there's no
- 4:48:09white space in front of this. Now this
- 4:48:11is actually unnecessary. I'm mainly just
- 4:48:13doing this for demo purposes. I'm going
- 4:48:15to remove this trim text portion. And
- 4:48:17underneath replace values, go into here
- 4:48:20to modify it. And for the via, I'll put
- 4:48:23via and then space. And now click okay.
- 4:48:27And in this case, whenever I select it,
- 4:48:29I can see that that white space was
- 4:48:31removed. We don't have to do an extra
- 4:48:33step. Minimize steps.
- 4:48:37Next up is the add column tab. And as
- 4:48:40the name implies, this adds a column.
- 4:48:43Transform, looking at transform and then
- 4:48:45looking at add column, there's a lot of
- 4:48:48similarities in functions between the
- 4:48:50two. And the key difference is is
- 4:48:52transform does it to the column itself
- 4:48:55and add column adds a new column. So
- 4:48:58besides just formatting text like
- 4:49:01extracting out or cleaning up the white
- 4:49:04space around different columns and
- 4:49:06creating a new column, I could use it
- 4:49:08for a use case like this in job posted
- 4:49:10date. This column name is actually
- 4:49:14slightly misleading because it says job
- 4:49:15posted date, but it's a date time. So if
- 4:49:19I wanted to make this column into a date
- 4:49:22and then this one into something called
- 4:49:24job posted date time, I could do that.
- 4:49:26So with this selected, I'm going to
- 4:49:28select up here to change this to a date
- 4:49:30and specifically date only. Now I want
- 4:49:34to change this name to job posted date.
- 4:49:37So I could click on it and try to enter
- 4:49:40job posted date and then press enter.
- 4:49:43But it conflicts with our other name. We
- 4:49:46have to rename the other one first. So,
- 4:49:48our original job posted date. I'm
- 4:49:50actually going to change this to job
- 4:49:52posted date time. And then change this
- 4:49:55one to job posted date. Now, I don't
- 4:49:58like where this job posted date is, like
- 4:50:01how far it is from job posted date time.
- 4:50:04So, I can drag it. I can also rightclick
- 4:50:07it and select to move it. It allows me
- 4:50:10to move it to the left, right to
- 4:50:12beginning, end. I can move it to the
- 4:50:13beginning. And we got this new step of
- 4:50:15reorder columns. This actually isn't
- 4:50:16where I want it. I'm going to drag it
- 4:50:18over. Get there. And now it's here. Now,
- 4:50:22unfortunately, with dates or date times
- 4:50:24of Word, go to something like column
- 4:50:25profile and try to visualize it. I could
- 4:50:28even change it to something like the
- 4:50:29entire data set. I'm not going to get
- 4:50:31much value out of this new distribution
- 4:50:34once all those values loaded in other
- 4:50:36than well, this bad boy. So there are
- 4:50:39some cases where now in this case I
- 4:50:42would go close and apply it and then
- 4:50:44load it directly into our file. Also we
- 4:50:47haven't done it already. We need to
- 4:50:48actually go in and save this. With that
- 4:50:50saved, let's actually get into
- 4:50:51visualizing it. We're going to be making
- 4:50:53line charts with this. Specifically, I
- 4:50:55want to compare that job posted date
- 4:50:58time basically without the hierarchy. So
- 4:51:00I'm going to rightclick this and remove
- 4:51:03that date hierarchy. And then we're
- 4:51:05going to do a count of the job title
- 4:51:07short. Remember previously in the last
- 4:51:09lesson, this is what we're seeing with
- 4:51:11that job posted date time whenever it
- 4:51:13wasn't formatted correctly. It's a hot
- 4:51:15mess. Not what we want to view. Anyway,
- 4:51:17I copied and pasted this over here to
- 4:51:19the right hand side. And even if I were
- 4:51:21to put job posted date in here now, and
- 4:51:24yeah, it's working. But even when I
- 4:51:25convert this to away from that hierarchy
- 4:51:28itself, the values are still usable.
- 4:51:32Unlike this one, not necessarily usable
- 4:51:35with this datetime format. All right,
- 4:51:37good enough to inspect. Let's jump back
- 4:51:39into Power Query Editor. We go back into
- 4:51:40transform data and then transform data.
- 4:51:44You can also access it by clicking these
- 4:51:46three dots right here for any data
- 4:51:48source and going into edit query. All
- 4:51:51right, so here we are back here. There's
- 4:51:53one final cleanup I want to do, one
- 4:51:55final exercise, if you will, and that
- 4:51:57deals with that salary hour average
- 4:52:00column. Oops, looks like I have column
- 4:52:01profile turned on. I'm going to turn
- 4:52:03that off. Anyway, if you remember, I
- 4:52:04wanted to compare or we're going to
- 4:52:07compare the salary year average column
- 4:52:10to an adjusted val value of the salary
- 4:52:14hour average column. Specifically,
- 4:52:15salary hour average is in an hourly
- 4:52:17format. We want to get into what would
- 4:52:19it be for a yearly salary. So what we
- 4:52:21need to do is take these values inside
- 4:52:23of salary hour average such as this one
- 4:52:26here of 61.15 and we want to multiply it
- 4:52:29times the number of hours in a week and
- 4:52:32the number of weeks in a year. So we
- 4:52:34come up here into the ad column
- 4:52:36underneath standard. We want to multiply
- 4:52:39this column that we have selected and
- 4:52:41there's 40 hours in a week and 52 weeks
- 4:52:44in a year. This actually comes out to
- 4:52:472080. You have to put in actual whole
- 4:52:49number in here for this. And we're go
- 4:52:52ahead and click okay. Now, I want to
- 4:52:54double check my values real quick. So,
- 4:52:56I'm just going to filter real quick to
- 4:52:58remove null. Remember, this will
- 4:53:00actually apply a step here of filter
- 4:53:03row. So, we'll need to remove this. And
- 4:53:06then, if I drag it on over next to
- 4:53:08salary average, so we can view it. We
- 4:53:11can see that. Okay. Yeah, it did
- 4:53:13actually apply the necessary
- 4:53:15multiplication to get the values we
- 4:53:16need. All right. So, let's remove these
- 4:53:18last two steps to get back where we
- 4:53:20were. We just reordered it and then also
- 4:53:22filtered. And we're doing this because
- 4:53:24navigating this multiplication column. I
- 4:53:26need to rename it. And we could do this
- 4:53:29by double clicking this, typing in the
- 4:53:31name of salary, hour adjusted. I need to
- 4:53:36get that right. Click enter. And then
- 4:53:37this adds another step. Remember, I'm
- 4:53:40not really a big fan of adding extra
- 4:53:42steps. I'm going to go ahead and stop
- 4:53:44this or close out of that step. If I
- 4:53:48select the inserted multiplication, open
- 4:53:50up this formula bar right here. Now, we
- 4:53:53don't need to be experts at reading this
- 4:53:55M language here, this formula bar. But
- 4:53:57what you can see, as we've seen
- 4:53:59previously with something like the
- 4:54:01change type, I'm going to select that
- 4:54:03one. These column headers are in
- 4:54:07parentheses.
- 4:54:08Similarly, if I go to insert and
- 4:54:10multiplication and I look at this column
- 4:54:13header is in parenthesis, these two
- 4:54:16match. So for this step of insert
- 4:54:19multiplication, it's giving it this
- 4:54:20name. Instead, I could change it up here
- 4:54:24to salary hour adjusted. Press enter and
- 4:54:28then it does it within the same step and
- 4:54:30there's no extra step or applied step.
- 4:54:33Now I could take salary hour adjusted
- 4:54:36and drag it over here. next to salary
- 4:54:39hour average. And I'm gonna get nitpicky
- 4:54:42because I I really like minimizing my
- 4:54:44steps. If you've noticed right now, we
- 4:54:46have two separate reorder columns. We
- 4:54:49know that the the we have multiple of it
- 4:54:50because it now says reordered columns
- 4:54:53one. My recommendation instead, this is
- 4:54:55an advanced technique. Don't worry if
- 4:54:57you're getting this and you made it this
- 4:54:58far with doing this, you're perfectly
- 4:55:00fine. I like being make sure we minimize
- 4:55:02our steps, right? So, I'm going to X out
- 4:55:03of this. I'm going to and this puts that
- 4:55:06salary hour adjusted back on the end.
- 4:55:08I'm going to drag reordered columns to
- 4:55:10the bottom. Now, whenever I take salary
- 4:55:13hour adjusted over here, it's going to
- 4:55:16insert it into that current step of
- 4:55:18reorg. So, there's no duplicate of that.
- 4:55:21So, you can feel free to move these
- 4:55:24applied steps around to wherever you
- 4:55:26need them to be. Um, but you need to be
- 4:55:28careful with how you do it. In this
- 4:55:29case, right, I get an error message. the
- 4:55:31column salary hour average wasn't found
- 4:55:34because it's created in this step. So
- 4:55:37you need to make sure whenever you're
- 4:55:39moving things you are keeping them in an
- 4:55:41order that keeps track of the current
- 4:55:43columns. Anyway, let's go inspect this.
- 4:55:45I'm going to close and apply and I'm
- 4:55:46going to create a new page. And in this
- 4:55:49we're going to be making a clustered bar
- 4:55:50chart. We want to compare this for the
- 4:55:52different job title shorts. So I'll drag
- 4:55:54that to the y ais. And now we can take
- 4:55:57something like the salary year average
- 4:55:59to the x-axis. I want to aggregate this
- 4:56:01by a median and salary hour adjusted
- 4:56:04also to the x-axis. This one will also
- 4:56:06be median. And bam, what we can see from
- 4:56:09this is well, let's go into focus mode
- 4:56:12that consistently hourly salaries are
- 4:56:16consistently below yearly salaries. And
- 4:56:20this is a great data point or a good
- 4:56:21insight because we need to understand or
- 4:56:24you want need to understand that yeah
- 4:56:26you may be taking a job as hourly but
- 4:56:28most likely you're going to get
- 4:56:30underpaid somebody that's paying on a
- 4:56:32yearly basis which is kind of jacked up
- 4:56:35and kind of pushes or trying to make
- 4:56:37people get full-time jobs with salaries
- 4:56:40vice somebody just working hourly. And
- 4:56:42in the final file I put together this
- 4:56:44scatter plot which I'm trying to show by
- 4:56:47this. I made them the axises equal where
- 4:56:49this one the left side is the adjusted
- 4:56:51or sorry the y- axis is the adjusted
- 4:56:53salary and the x-axis is the yearly
- 4:56:55salary and these the axises goes from
- 4:56:5880,000 to 160,000 for both of these. So
- 4:57:01the the actual area itself the plot area
- 4:57:04is similar across each. Anyway, what
- 4:57:06we'd hope to see with this line of best
- 4:57:09fit between all these different job
- 4:57:11titles right here is that it goes
- 4:57:13exactly splits in between the two.
- 4:57:16Unfortunately, it's inclined or morely
- 4:57:20more towards the yearly median salary,
- 4:57:22which is also what we showed in this bar
- 4:57:26chart in that yearly salaries are higher
- 4:57:29than those adjusted hour salaries. All
- 4:57:32right, so you have some practice
- 4:57:33problems now to go through and get more
- 4:57:35familiar with using the Power Query
- 4:57:37Editor. In the next lesson, we're going
- 4:57:39to be using the Power Query editor
- 4:57:41specifically to bring in and clean up
- 4:57:44the data set that we're going to be
- 4:57:46using for the final project. All right,
- 4:57:48with that, I'll see you in the next one.
- 4:57:53In this lesson, we're going to be
- 4:57:55importing in our final data set that
- 4:57:58we're going to be using for our second
- 4:58:00project. It's quick to note there's no
- 4:58:02difference in data between the two.
- 4:58:05We'll get to all that in a little bit,
- 4:58:06but it's more important if you
- 4:58:08understand there's not going to be
- 4:58:08really a change in data, but in how we
- 4:58:11can actually analyze it. Now, what do I
- 4:58:13mean by this?
- 4:58:16So, I'm inside the project file from the
- 4:58:19last lesson where we imported in our job
- 4:58:22postings flat CSV. And if I scroll on
- 4:58:26over here specifically to these two
- 4:58:29columns on job skills and job type
- 4:58:32skills, we're going to focus on job
- 4:58:33skills for a time being. It is of the
- 4:58:36format text and it's a list of skills in
- 4:58:39here. But how the heck am I supposed to
- 4:58:41use this these skills when they're
- 4:58:44associated with a certain job? Like you
- 4:58:46could have multiple skills to a job. If
- 4:58:48I were try to create a bar chart of
- 4:58:50these skills and as as you expect if I
- 4:58:53try to drop something like the job
- 4:58:55skills into here doing it by count going
- 4:58:58into focus mode so we can see it better.
- 4:59:00Basically it's just providing counts of
- 4:59:02these different lists but this doesn't
- 4:59:04really provide us cuz the it hasn't
- 4:59:05broken up these skills. And remember
- 4:59:07from this looking at the model view this
- 4:59:10is only one table that has everything in
- 4:59:13it. It's called a flat table. Well, here
- 4:59:16I am in the final file for this lesson.
- 4:59:19And in it, I'm an able to analyze what
- 4:59:22are the top skills and data. Basically,
- 4:59:24we're looking at those skills and
- 4:59:26they're actually broken out individually
- 4:59:28for this, but have the appropriate job
- 4:59:31count for how many jobs there are. How
- 4:59:33is this even possible? Well, if we go
- 4:59:34into the model view for this final video
- 4:59:36file of the lesson, we can see that we
- 4:59:39have multiple tables inside of here and
- 4:59:43we have these lines between them
- 4:59:45allowing us to connect relationships to
- 4:59:48it. Now, we're going to get all into all
- 4:59:50this and break it down further, but the
- 4:59:52gist of it is is we have one table with
- 4:59:55all of our job postings and then one
- 4:59:57table with our skills and we're
- 4:59:58connecting it to the two and we're able
- 5:00:00to query across these tables. So, let's
- 5:00:04break this concept down by looking at
- 5:00:07this erd or entity relationship diagram
- 5:00:12of the final table of what we just saw
- 5:00:14in PowerBI but broken out here. So for
- 5:00:17this this is arranged into what's called
- 5:00:20a star star schema and we have fact
- 5:00:23tables and then dimensional tables
- 5:00:26specifically we have our job postings
- 5:00:29fact table that's why facts at the end
- 5:00:30and then all these other ones are
- 5:00:32dimensional table tables that's why we
- 5:00:34have the dim at the end this is a
- 5:00:36shorthand notation and is pretty common
- 5:00:38whenever you're using this type of
- 5:00:40structure on how you'd expect things to
- 5:00:42be named anyway the job posting fact
- 5:00:44table contains all the measurable data.
- 5:00:48So, every single job posting, if you
- 5:00:50worked in something like sales and had a
- 5:00:52similar thing, all of the different
- 5:00:54orders would probably be in the fact
- 5:00:56table and then things like information
- 5:00:59on the customers or information on the
- 5:01:01stores would be in the dimensional
- 5:01:03tables. Similarly, our dimension tables
- 5:01:06have things like the company and then
- 5:01:08also the skills. These fact tables are
- 5:01:11going to take much more rows because
- 5:01:13they contain every single attribute.
- 5:01:15Whereas something like a company dim is
- 5:01:18only going to contain a company once or
- 5:01:21a skills dim is only going to contain a
- 5:01:23skill once but then link it to the job.
- 5:01:26Now because we're using this fact and
- 5:01:28dimensional tables, it's commonly
- 5:01:29referred to as a star schema. Going back
- 5:01:33to PowerBI, it's hard to really see star
- 5:01:35schema with this one because we only
- 5:01:38have basically two relationships coming
- 5:01:40off of the skills in the company. But if
- 5:01:42we go to the very last lesson file,
- 5:01:44which we'll get to at the end of chapter
- 5:01:454, this starts to look more like a star
- 5:01:48schema because we have our job posting
- 5:01:49fact table and then we're going to
- 5:01:51create even more dimensional tables
- 5:01:53creating this star schema. But that's
- 5:01:55for chapter four. Getting ahead of
- 5:01:57oursel. Now, this isn't to say flat
- 5:02:00tables are completely useless. Flat
- 5:02:03tables have their time and place,
- 5:02:05especially for those that are maybe new
- 5:02:07to analyzing data or aren't familiar
- 5:02:10with data set. It makes it have a simple
- 5:02:12structure and super easy to actually
- 5:02:15query. But as we demonstrated with that
- 5:02:17star schema in the final lesson for
- 5:02:19this, right, we're going to be able to
- 5:02:20actually get in and do some deeper
- 5:02:22analysis because now we can actually
- 5:02:24analyze multiple skills for a job
- 5:02:26posting and flat tables can't handle
- 5:02:29this. And so they're only they're
- 5:02:31somewhat limited if you will.
- 5:02:36So enough yapping. Let's actually put
- 5:02:37this into practice and import in this
- 5:02:40data set. And during this, we're going
- 5:02:42to be diving into an important concept
- 5:02:44of reference first query. Anyway,
- 5:02:46starting off with a blank report for
- 5:02:48this. So, we have this file. Let's get
- 5:02:50into getting it. Specifically, we want
- 5:02:52to get our data. As we learned
- 5:02:54previously, we can get it from a folder.
- 5:02:57So, after selecting more, I navigate
- 5:02:58into folder and select connect. And for
- 5:03:01this, I'm going to select the location
- 5:03:03of our star schema files. And this is
- 5:03:06inside of our PowerBI data analytics
- 5:03:08course project folder underneath data.
- 5:03:11And in this folder called star schema
- 5:03:13files, we have four different CSV files
- 5:03:16that we're going to be importing for
- 5:03:18this. Anyway, I've navigated to it. I'm
- 5:03:20clicking okay. And similar before, this
- 5:03:22is showing the four different files
- 5:03:23which is going to be made into the four
- 5:03:25different tables. We do not want to
- 5:03:29combine and transform data or combine
- 5:03:30and load. We don't want to do this
- 5:03:31option. We need to go into the power
- 5:03:34query editor. So we're going to go to
- 5:03:35transform data. What we need to do now
- 5:03:38inside of this power query editor is we
- 5:03:40need to drill down or create queries for
- 5:03:43each one of these. I can actually
- 5:03:45demonstrate this inside the star schema
- 5:03:47files query. If I want to navigate to
- 5:03:49job postings fact, I can click binary
- 5:03:52and it basically does the entire cleanup
- 5:03:56necessary to get this job postings fact
- 5:03:59table all ready to go. But the problem
- 5:04:01is now you know I'm lazy. I need to now
- 5:04:04do this for these three other sources. I
- 5:04:06don't want to go through and actually
- 5:04:09select new source, do that again of we
- 5:04:12selecting the file and then uploading
- 5:04:14again. I'm going to do something
- 5:04:15actually even simpler than that. So I'm
- 5:04:17going to remove these different steps
- 5:04:19that we did right here up to the point
- 5:04:21of source. And this is getting into now
- 5:04:25how we can create new queries. We can
- 5:04:26either duplicate it and in this case
- 5:04:29this duplicated one which has the
- 5:04:31parenthesis 2 just has the same files or
- 5:04:35same code that if we look at the
- 5:04:37previous query as that one that's
- 5:04:40actually not showing much. So let's
- 5:04:41actually instead I'm going to delete
- 5:04:42this one and with this star schema file
- 5:04:45I'm going to make some changes to it.
- 5:04:46Specifically let's just say go into the
- 5:04:47job postings fact table. And now
- 5:04:49whenever I rightclick this one and
- 5:04:51select duplicate, notice all of these
- 5:04:54applied steps were done with this
- 5:04:57whenever I duplicated this. However, if
- 5:05:01I were to rightclick this one and
- 5:05:03instead click reference to create a new
- 5:05:05query number three, the reference one,
- 5:05:08this one only has one step. And the step
- 5:05:12looking at it up here is hey set it
- 5:05:14equal to star schema files which is this
- 5:05:17first query. So the point I'm trying to
- 5:05:19make is with the duplicate you don't
- 5:05:21sometimes want to do this especially if
- 5:05:23it's going to just repeat all the steps
- 5:05:25when they've been done already. It's
- 5:05:26going to cause a necessary load time
- 5:05:28later on. So let's go ahead and delete
- 5:05:31both these and then from there remove
- 5:05:33those steps to get into showing more
- 5:05:36steps necessary. And now for this, what
- 5:05:39we're actually going to do, I'm going to
- 5:05:41rightclick this and I'm going to
- 5:05:43reference it. And this first one, I want
- 5:05:46to reference it to be the job postings
- 5:05:49fact table, which I've changed the name
- 5:05:51up in the properties right here. This
- 5:05:53one, we're going to dive into here. And
- 5:05:55now this has our necessary table. So
- 5:05:58we'll need to do this again for all
- 5:05:59these other tables. I'll start with
- 5:06:01skills dim once again. We'll reference
- 5:06:02it. We'll click into skills dim. And I
- 5:06:05didn't rename it first, but that's fine.
- 5:06:06And I can still go in and say skills
- 5:06:08dim. All right, just need to do the
- 5:06:10remaining two now. So now we have all
- 5:06:12four of the tables in. We have our fact
- 5:06:14table, our skills dimensional table,
- 5:06:16skills job dim, and our company dim.
- 5:06:19We're going to go ahead now and click
- 5:06:21close and apply to get this into our
- 5:06:24PowerBI file. In the data pane, I can
- 5:06:26see all our four tables along with our
- 5:06:28star schema files. I can even go to the
- 5:06:30model view, which is the most important
- 5:06:32for this. and rearranging this all so we
- 5:06:35can see it a little bit better. We can
- 5:06:37see that it established the
- 5:06:40relationships necessary between here.
- 5:06:42Now, we're going to jump into
- 5:06:43relationships here in a second. I first
- 5:06:45want to focus on this this star schema
- 5:06:47file. This isn't really necessary inside
- 5:06:51of this area here. And specifically, I'm
- 5:06:54not going to need it inside of the
- 5:06:56canvas. I don't really want that. And if
- 5:06:58I were to share this with somebody, I
- 5:06:59wouldn't want somebody to have or to see
- 5:07:01it. Now, I could do something like this
- 5:07:04and I could hide it, but this isn't
- 5:07:06hiding it in the model view. It's only
- 5:07:08hiding it here inside of the data view.
- 5:07:11So, actually, I'm going to recommend not
- 5:07:13even loading this table into PowerBI.
- 5:07:17So, all we need to do is go back into
- 5:07:19Power Query editor by going to transform
- 5:07:21data and with this star schema file, I'm
- 5:07:24going to rightclick it and look at this.
- 5:07:26We have this that's checked right now.
- 5:07:28Enable load. We're gonna click it and
- 5:07:31it's gonna say, "Hey, there's possible
- 5:07:32possible data loss warning. Promise you
- 5:07:34we're not going to lose any data." And
- 5:07:35the name went into italics. And now
- 5:07:37right clicking, we'd see enable load is
- 5:07:40no longer clicked next to it. So
- 5:07:43whenever I click close and apply and
- 5:07:46navigate to the model view, it's not in
- 5:07:49here. And it keeps things super simple
- 5:07:51for anybody that you may pass this file
- 5:07:53on to.
- 5:07:56All right, so let's now get into
- 5:07:57relationships. And I'm actually going to
- 5:07:59assume PowerBI was smart enough in this
- 5:08:01case to pick up these different these
- 5:08:04three different relationships between
- 5:08:05our tables. But I'm going to assume that
- 5:08:07maybe it didn't work for you. So what
- 5:08:08we're going to do is go ahead and delete
- 5:08:11all of these different relationships in
- 5:08:12here by right-clicking on them,
- 5:08:14selecting delete. Now let's recreate all
- 5:08:16of these for the job posting fact table.
- 5:08:18I want to connect these. And we can see
- 5:08:20we have company ID. We want to connect
- 5:08:22it to company ID. So I just drag it to
- 5:08:24each other. And then this new
- 5:08:26relationship pop-up window comes up
- 5:08:28here. In it, it has the table selected,
- 5:08:31which columns are they selected on, and
- 5:08:33it automatically selects the cardality.
- 5:08:36And this describes how rows from one
- 5:08:39table correlate to another. In this
- 5:08:42case, it's saying many to one. In the
- 5:08:45job postings fact table, we can see here
- 5:08:47just from this snippet here at the top,
- 5:08:49the company ID, there's many.
- 5:08:52Specifically, we have 1145 multiple
- 5:08:54times. There are many values for the
- 5:08:57company dim. There's one value. Even
- 5:09:00just looking at this snippet, there's
- 5:09:02only one unique value in here. It
- 5:09:04automatically figures this out. This is
- 5:09:06not something you need to do. There's
- 5:09:08also cross filter direction, which we're
- 5:09:10going to get to towards the end of this
- 5:09:11lesson. And always we want to make this
- 5:09:14relationship active. I'll go ahead and
- 5:09:15click save. Now the other way we could
- 5:09:17create a relationship is okay let's say
- 5:09:19in this case I want to now connect our
- 5:09:21skills tables now together specifically
- 5:09:24skills job dim has a job ID column so I
- 5:09:28know I can connect to this job ID I'm
- 5:09:29not going to drag it instead I'm going
- 5:09:30to rightclick it and I'm going to go
- 5:09:32into manage relationship in this I'm
- 5:09:34going to select hey let's add a new
- 5:09:36relationship and that similar window
- 5:09:38that we saw before is going to show
- 5:09:40there I'm going to put job postings fact
- 5:09:42up at the top and then skills job dim
- 5:09:46underneath it and it automatically
- 5:09:48picked up that job ID that these are the
- 5:09:51columns it's going to be related on. Now
- 5:09:53somewhat similar to the last one instead
- 5:09:54of being a many to one this one is going
- 5:09:56to be a one to many. Specifically
- 5:09:59there's only going to be one unique job
- 5:10:01ID in here but in our skills job dim
- 5:10:05there's going to be many job IDs.
- 5:10:09Unfortunately we only have a data
- 5:10:10preview of three values. So, I can't
- 5:10:12show that. In fact, job ID five. There's
- 5:10:14there's multiple values of five in
- 5:10:16there. Anyway, I'm going to click go
- 5:10:17ahead and save because we're going to
- 5:10:18keep everything else by default. And I'm
- 5:10:20going to close out of this. And now we
- 5:10:22can see that this relationship is going.
- 5:10:24And when I highlight it over, we can see
- 5:10:25that the job ID is there. All right.
- 5:10:27Let's just connect the last table. And
- 5:10:28that's going to be connecting the SC uh
- 5:10:30skills job dim down into the skills dim.
- 5:10:34Okay. In this case, we're once again
- 5:10:36going to connect on a skill ID. This is
- 5:10:38a many to one relationship. Inside the
- 5:10:41skills job dim table, there's many
- 5:10:43values. In this case, multiple ones. But
- 5:10:46there's only one unique value inside the
- 5:10:48skill dim. Basically, this table lists
- 5:10:51all the different skills in there, but
- 5:10:54only lists them once. I'm going to go
- 5:10:56ahead and click okay. And now we have up
- 5:10:59all our relationships established. Now,
- 5:11:01we can also see these relationships here
- 5:11:04with the nomenclature they're using.
- 5:11:06They have a one on this side and then an
- 5:11:08asterisk here. So in this case from
- 5:11:10company dim to job posting facts it's a
- 5:11:12one to many relationship. You're
- 5:11:14typically going to always see either a
- 5:11:16one to many many to one or a one to one
- 5:11:19relationship. If you're getting to
- 5:11:21situations of a many to many that's
- 5:11:24going to cause a lot of confusion and
- 5:11:26it's going to eat up a lot of resources
- 5:11:28trying to match up data. Anyway that's
- 5:11:29beyond scope of this. That's more of an
- 5:11:31advanced technique to deal with. In most
- 5:11:33cases, you're going to be seeing this
- 5:11:35one to many or many to one. Anyway,
- 5:11:37let's get into verifying that this is
- 5:11:38set up correctly by first visualizing
- 5:11:40the company table. So, we're going to
- 5:11:42drag a stack bar chart into here. Going
- 5:11:44to minimize the filter so we can see
- 5:11:46this a little bit better. Anyway, with
- 5:11:48our company DIM table that has the
- 5:11:50company information in it, such as
- 5:11:52company ID, links to the companies, the
- 5:11:54name of the company, I'm going to go
- 5:11:56ahead and drag that into the Yaxis. And
- 5:11:59then inside of job postings fact, recall
- 5:12:02that no, we no longer have the company
- 5:12:04name inside of here. That's why we
- 5:12:06dragged it from above. But also with
- 5:12:08this, making this a little bit bigger.
- 5:12:10We do have inside of here a job ID. So
- 5:12:14we can now start doing the job ID, the
- 5:12:17count of the job ID vice doing that
- 5:12:20count of that job title short, which I
- 5:12:22feel a count of job ID is more common in
- 5:12:24practice. Anyway, we can see that we're
- 5:12:27using these multiple different tables
- 5:12:28because we have these check marks here
- 5:12:30saying we're using these tables. So,
- 5:12:31we're filtering across tables. And with
- 5:12:34this going into focus mode, we can now
- 5:12:36see the count of those different jobs, I
- 5:12:39mean companies. We could even take this
- 5:12:41a step further by copying this and then
- 5:12:43pasting it. And instead of doing counts
- 5:12:45of jobs, we could drag that salary year
- 5:12:47average into here, adjust it to a median
- 5:12:49aggregation, and then see things like,
- 5:12:51hey, Goldman Tech Resourcing gives up to
- 5:12:54$870,000
- 5:12:57for a median salary. Not too bad. So,
- 5:12:59that's the company information. Let's
- 5:13:00create a new page and analyze the skills
- 5:13:03or if we can analyze the skills. Now,
- 5:13:05just to remember, right, this one's a
- 5:13:07little bit more complicated. We have a
- 5:13:08skills job dim and then a skills dim
- 5:13:10table. Why do we have two? Well, going
- 5:13:14to the skills job dim table, we have our
- 5:13:17job IDs and then our skill ID. I'm going
- 5:13:20to sort the job ID in ascending order to
- 5:13:23better showcase this. But basically,
- 5:13:24remember, we could have multiple
- 5:13:27different skills for a job. So, in this
- 5:13:31case, job ID of one has skill of 205 and
- 5:13:35178. and then our skills dim table. We
- 5:13:40could then inspect from here. Navigating
- 5:13:42to 205, we could see, hey, the skill ID
- 5:13:45is a skill ID of flow and that 178 is
- 5:13:49for Tableau, which is the type analyst
- 5:13:52tools. Anyway, you're probably like,
- 5:13:54Luke, why the heck do you have multiple
- 5:13:56tables in this case? Well, the reason is
- 5:13:59to solve an issue where there can be
- 5:14:02multiple skills for a job. But for our
- 5:14:06companies, there can't be multiple
- 5:14:08companies listing the same job posting.
- 5:14:10There's only one. So, in this case, we
- 5:14:13were able to make it into only one
- 5:14:15table. And we have one value or one
- 5:14:18company to many different job postings
- 5:14:20is put out. But we wouldn't be able to
- 5:14:23do that with just a skills dim directly
- 5:14:26connected to this. Remember, we'd have a
- 5:14:28many to many relationship. This would be
- 5:14:30a mess. It'd be a heck to deal with.
- 5:14:32That's why we have to have this
- 5:14:33intermediate table skills job dim.
- 5:14:36Anyway, enough me yapping. Let's
- 5:14:38actually get into trying to visualize
- 5:14:40this. Once again, we're going to insert
- 5:14:42in a stack bar chart. We're going to use
- 5:14:44the skills dim to insert in our skills
- 5:14:48into the yaxis and then go to the job
- 5:14:51postings fact table to put remember that
- 5:14:53count of job ID. Now, if you notice by
- 5:14:56this, we have relationship issues with
- 5:15:00this. Mainly, all of these values, the
- 5:15:03count of the job ID is 470,000.
- 5:15:06[Music]
- 5:15:07Basically, the count of all the
- 5:15:09different job IDs. What's going on here?
- 5:15:12Well, it deals with cross filter.
- 5:15:17So, what's going on here? Well, let's
- 5:15:19navigate back to that model view. And
- 5:15:21I'm going to move these around slightly.
- 5:15:23specifically. I don't care about the
- 5:15:24company dim table. Dragged it off the
- 5:15:26screen for right now. We care about
- 5:15:28these skills tables. All right. So,
- 5:15:30what's going on here? And that has to
- 5:15:32deal with this cross filter direction.
- 5:15:34Right now, if I were to double click on
- 5:15:36this, I can see cross filter direction
- 5:15:38is on single. And there's only one arrow
- 5:15:41on there. And it shows it's going from
- 5:15:42the job postings fact table so to the SC
- 5:15:45skills job dim. And then over here on
- 5:15:49the skills dim table, we can see that
- 5:15:51the direction is from skills dim to
- 5:15:53skills job dim. This arrow is correlated
- 5:15:58with the filter direction or the flow of
- 5:16:01how we want data to go. Right now for
- 5:16:04this visualization, we're using the job
- 5:16:07ID of job postings fact and then skills
- 5:16:10of skills dim. And so we're trying to
- 5:16:13filter from skills and get what the job
- 5:16:18I the count of the job ID is over here.
- 5:16:20And so if we had and we did a flow of
- 5:16:22the arrow, yeah, we can go into this
- 5:16:24table, but then when we try to go
- 5:16:26through this relationship, it's only in
- 5:16:28the direction opposite to this. So you
- 5:16:30can't do it. But job ID is in here.
- 5:16:33Could we do it for that? Well, let's
- 5:16:34find out. We're going to duplicate this
- 5:16:36table and instead of doing the count the
- 5:16:39job ID from this job postings fact
- 5:16:41table, like I said, we're going to do it
- 5:16:43from the skills job dim table and throw
- 5:16:45it into here. And bam, this one does
- 5:16:48work and shows us the counts of this.
- 5:16:52But if you remember from our company
- 5:16:55analysis, we not only were able to do a
- 5:16:56count of the jobs, we were also able to
- 5:16:58do the median salary. So it solves the
- 5:17:00problem of getting the count. But now if
- 5:17:02I wanted to use the actual salary year
- 5:17:04average column to get the median, I
- 5:17:06still can't do that. So this is not the
- 5:17:08solution we necessarily want to do or
- 5:17:10the most optimal. I'm going to go ahead
- 5:17:11and remove this. What we can do instead
- 5:17:14to make sure that we get this filtering
- 5:17:16of skills to be able to happen all the
- 5:17:18way back to the job postings fact is I'm
- 5:17:20going to take this and rightclick it. Go
- 5:17:22to properties and for between these two
- 5:17:25tables of job postings fact and skills
- 5:17:27job dim I'm going to change the cross
- 5:17:28filter direction to both it ungrade this
- 5:17:32area of apply security filter in both
- 5:17:34directions. We're not going to be
- 5:17:35applying security filters for this. I'm
- 5:17:37not controlling who has access to this
- 5:17:40data. Anybody can have access to it.
- 5:17:42It's public so I don't care about that.
- 5:17:43Click save. So it updated here as that
- 5:17:46double arrow. Now when I go into report
- 5:17:48view, bam, it is updated. And I can even
- 5:17:52do something similar crl +v. Instead of
- 5:17:55doing that count of the job ID, I can
- 5:17:57drag in that salary year average and do
- 5:18:00that median value. And then we can see
- 5:18:02something like unreal has a median
- 5:18:05salary of almost $101,000.
- 5:18:09It looks like a lot more less frequent
- 5:18:11skills have these higher salaries.
- 5:18:13Basically, we can filter this for the
- 5:18:16top. We'll say top 20 skills. So, I'm
- 5:18:18going to go to the skills filter. Do a
- 5:18:20top N. And we're going to do a count by
- 5:18:24count of job ID. Selecting the top 20
- 5:18:27values. Go apply filter. And now,
- 5:18:30closing this on out. We can see these
- 5:18:33are the top 20 values. We can see
- 5:18:34something that's actually more useful
- 5:18:36like Scala Spar, Kafka, and then we can
- 5:18:38even see data analytical tools down
- 5:18:40here. Even PowerBI makes the list.
- 5:18:41Although second from last but at least
- 5:18:43above Excel. So anytime you're working
- 5:18:45with these fact and dimensional tables,
- 5:18:48it's important to understand what is
- 5:18:50going on with the filtering direction.
- 5:18:52In the case of our company thing, we
- 5:18:54were able to do that our company
- 5:18:56analysis because the company when we
- 5:18:58selected the name here, we were able to
- 5:19:00filter back into the job postings fact
- 5:19:02table to get the count of that job ID.
- 5:19:05Now there's no practice problems for
- 5:19:07this lesson. So congratulations. I do
- 5:19:09want you to make sure that you do
- 5:19:11understand what's going on with this
- 5:19:13cross filtering and also relationships.
- 5:19:16So if you need to feel free to go back
- 5:19:18and rework any of this. We will be
- 5:19:20testing these concepts in upcoming
- 5:19:23problems in the next lessons, but like I
- 5:19:25said, none for this lesson. All right,
- 5:19:26with that, I'll see you in the next
- 5:19:28lesson where we're going into advanced
- 5:19:30transformations. See you there.
- 5:19:36Welcome to this lesson. We're going to
- 5:19:38be diving in deeper into using advanced
- 5:19:40transformations to make that data set we
- 5:19:43just imported in for project 2 even more
- 5:19:47usable. Now, don't get too nervous that
- 5:19:49the fact that the name of this is
- 5:19:51advanced transformations. It's well
- 5:19:52within your capabilities. Let's take a
- 5:19:54look at what we're going to do. In the
- 5:19:56last lesson we imported in, we went
- 5:19:59through and we were able to visualize
- 5:20:01based on the different skills what were
- 5:20:03their counts. But if you have bosses or
- 5:20:07stakeholders like me that are super
- 5:20:08picky, they're not going to really like
- 5:20:10that all these skills are lowercase and
- 5:20:13don't have the proper capitalization.
- 5:20:16Well, navigating to the lesson file that
- 5:20:18we're going to be completing by the end
- 5:20:19of this and we're going to be have it
- 5:20:22where the column for skills are going to
- 5:20:24be nice and cleaned up with all the
- 5:20:26proper capitalization as necessary so we
- 5:20:29have no complaining boss or
- 5:20:30stakeholders. This is going to be done
- 5:20:32using some basic text cleanup, a lot of
- 5:20:35which we've seen before, but also a new
- 5:20:38concept of conditional columns,
- 5:20:40basically an if statement. Now, the
- 5:20:43first thing that we're actually going to
- 5:20:44be cleaning up revolves around this job
- 5:20:47schedule type column, which is inside of
- 5:20:49our job postings fact table. If we go
- 5:20:52and click this drop- down arrow here, we
- 5:20:54can see that there is multiple different
- 5:20:57values. And this makes it very difficult
- 5:21:01to say like, hey, what happens if I want
- 5:21:03to analyze a job that has part-time and
- 5:21:06contractor? Why can't I make it to where
- 5:21:08the job is part-time and contractor?
- 5:21:10Previously, in the past, we've just gone
- 5:21:12through and analyzed this by unselecting
- 5:21:14this and then only selecting the
- 5:21:16keywords of like contractor, full-time,
- 5:21:19internship, part-time, and whatnot. But
- 5:21:21unfortunately, that leaves out a lot of
- 5:21:23different jobs. So, we're going to clean
- 5:21:24up this column. Specifically, what we're
- 5:21:27going to be doing, we go into the final
- 5:21:29file for this lesson. We're going to be
- 5:21:31creating another dimensional table. And
- 5:21:34this is going to have the job schedule
- 5:21:36type in it. and it's going to be
- 5:21:38connected to our job postings fact table
- 5:21:41via a job ID. If I navigate into table
- 5:21:44view and check out this schedule dim,
- 5:21:47what I can see is that it's going to
- 5:21:49have an associated job ID and then the
- 5:21:52second column is going to be the uh the
- 5:21:54job schedule type. If I sort this job ID
- 5:21:56in ascending order, we can see things
- 5:21:58like the job ID zero has multiple
- 5:22:02different conditions that meets it. So
- 5:22:05now, similar to how jobs can have
- 5:22:07multiple skills, we can also have it to
- 5:22:09where jobs have multiple job schedule
- 5:22:12types. With this, we'll be able now to
- 5:22:15analyze not only different job counts or
- 5:22:17the correct job counts for a specific uh
- 5:22:20job type, but also things like this, the
- 5:22:22median median yearly salary of different
- 5:22:25job types. All right, enough meapping.
- 5:22:27Let's jump into creating this table
- 5:22:29where we have these two columns, and
- 5:22:31it's specific to the job schedule type.
- 5:22:35So for this, feel free to start with the
- 5:22:38file that we were using at the end of
- 5:22:40last lesson. If you lost track along the
- 5:22:42way, you can just jump into the previous
- 5:22:45lessons file of 3.3 project 2 import.
- 5:22:49Right now in here under the model view,
- 5:22:51I'm going to go ahead and close these
- 5:22:52tabs. We only have dimensional tables
- 5:22:54regarding the skills and the company
- 5:22:56down. Like I said, we want to create one
- 5:22:58for the schedule type. And the schedule
- 5:23:01type information is inside of this job
- 5:23:03postings fact table. So we need to get
- 5:23:06it out of there into its own table. So
- 5:23:09I'm going go into transform data.
- 5:23:10Transform data in order to open Power
- 5:23:12Query Editor. So we're going to want to
- 5:23:14be cleaning up this job schedule type
- 5:23:16column which is in that job postings
- 5:23:18fact, right? Which is right here. So the
- 5:23:21first thing we need to do in order to
- 5:23:22get our own dimensional table is we want
- 5:23:25to create a new table with well one job
- 5:23:30schedule type and then also the job ID.
- 5:23:33Remember going to that final table this
- 5:23:35is what we want it to look like. So with
- 5:23:37this we need to either we can rightclick
- 5:23:40it and see we can either duplicate or
- 5:23:41reference. Now you can also access this
- 5:23:43by ensuring job postings facts is
- 5:23:46selected and then under the home tab
- 5:23:48going to manage your queries. In this
- 5:23:50case I can delete it, duplicate it or
- 5:23:52reference. Remember duplicate as I just
- 5:23:55did now keeps all those same steps going
- 5:23:58on. I don't want to add unnecessary
- 5:24:00steps and increase the load time. So
- 5:24:03we're not going to do this one. I'm
- 5:24:04going to select this one, go to manage,
- 5:24:06and delete it. Instead, we're going to
- 5:24:09select this one. And now we're going to
- 5:24:11manage it and reference it. And as we
- 5:24:14can see the source for this step is only
- 5:24:18job postings fact which relates to this
- 5:24:22table right here which has those
- 5:24:24multiple different steps in it. And as a
- 5:24:25quick refresher you can for this table
- 5:24:28just to verify the steps you can do
- 5:24:30something underneath the home tab going
- 5:24:32into the advanced editor and this has
- 5:24:34all the code necessary to build this
- 5:24:37table which is only a few lines of code.
- 5:24:40Anyway, cool story. Let's rename this.
- 5:24:42Now up here, we'll name it to schedule
- 5:24:44dim. On renaming it, press enter and
- 5:24:46everything updates for it.
- 5:24:50So with this table, we now want to keep
- 5:24:52just two columns. Job ID and job
- 5:24:55schedule type. Now what we could do is
- 5:24:57we come to the very last column here
- 5:25:00underneath the home tab. I can go to
- 5:25:02remove columns. And they have this first
- 5:25:04one of columns. So I can select remove
- 5:25:07it. And then I can just keep on doing
- 5:25:08this until all the different columns are
- 5:25:11removed and that would take a while. So
- 5:25:14I'm actually going to remove this step
- 5:25:16of remove columns. We're going to do a
- 5:25:17better approach and instead we're going
- 5:25:19to select the two columns we want. I'm
- 5:25:21going to select this one. Scroll on over
- 5:25:23to job schedule type. Holding control
- 5:25:25I'm going to press job schedule type. So
- 5:25:27now both of these are now selected. And
- 5:25:31then I can go to remove other columns.
- 5:25:34Now the other method we could do this
- 5:25:36that's also just as easy is I can remove
- 5:25:38that step again and in this case I could
- 5:25:40just doesn't we don't have to have any
- 5:25:41column specific column selected. I could
- 5:25:43go to choose column and then select
- 5:25:45choose columns and then from now we
- 5:25:47select the columns we want. We want job
- 5:25:49ID and job schedule type. This is
- 5:25:51actually probably the easiest way and it
- 5:25:54eventually ends up using just that
- 5:25:55removed other column step. So
- 5:25:58remembering our end goal, we want to
- 5:26:00create only one schedule type per row.
- 5:26:03If I just open this up here to select or
- 5:26:06in view inside of here, I can see that
- 5:26:08we have multiple different values for
- 5:26:11these. Also, you may notice this in many
- 5:26:13of these different lists that it says
- 5:26:15list is incomplete. All you have to do
- 5:26:17is load more and then you get all the
- 5:26:19list of all the different options in
- 5:26:21there. Remember, this is due to the fact
- 5:26:23that we're doing column profiling based
- 5:26:25on that top thousand rows. So whenever I
- 5:26:27do the drop down like this, it's only
- 5:26:28showing the values or the unique values
- 5:26:31for the first thousand rows. Anyway,
- 5:26:34well, we need to get a game plan
- 5:26:35together on how we're going to create
- 5:26:37these into different rows. My idea is
- 5:26:40this. We're going to be using the comma
- 5:26:44within these fields in order to split
- 5:26:47them into new rows. Specifically, I can
- 5:26:50select job schedule type. This is what
- 5:26:53we're skipping some steps right now. I
- 5:26:54just want to show this. We're going to
- 5:26:55go into split column by delimiter and I
- 5:26:57can specify that we're going to be
- 5:26:59splitting by comma and each occurrence
- 5:27:02of the delimiter itself and other
- 5:27:05advanced options we're going to be doing
- 5:27:07rows. Now the problem with this is as
- 5:27:09you're going to see like this case where
- 5:27:12we have an and value it didn't split it
- 5:27:15as necessary and we'd have to do it
- 5:27:16again. Also just popping out this
- 5:27:19dropdown here. We can see that we have
- 5:27:21like oh this one has and in this this is
- 5:27:24just I'm not liking I'm not liking how
- 5:27:27this is done. So here's my
- 5:27:28recommendation. Let's actually go ahead
- 5:27:31and remove this change type and this
- 5:27:34split column by delimiter and let's go
- 5:27:37forth with replacing
- 5:27:40like in this case let's replace this
- 5:27:43value right here with a comma. So under
- 5:27:47transform I can select this column and
- 5:27:49we can go to replace values and for this
- 5:27:52for the value to find we're going to do
- 5:27:56space and it is going to be able to pick
- 5:27:59up this space and we want to replace
- 5:28:01this with a comma and then go ahead and
- 5:28:04click okay. All right not bad. We can
- 5:28:08inspect these values and we can see that
- 5:28:11in the cases where there was multiple
- 5:28:13like three it replaced that and but now
- 5:28:16it has two commas in there. So what I'm
- 5:28:20going to recommend instead is we're
- 5:28:21going to go back one step to remove
- 5:28:23other columns and let's start by
- 5:28:26actually replacing this portion
- 5:28:29specifically. I'm going to click on it
- 5:28:30so we can see it. Let's go forth with
- 5:28:32replacing this section of a comma space
- 5:28:35and with just a comma before we do our
- 5:28:39next one. So, making sure that I am on
- 5:28:41that second step, I'm going to go to
- 5:28:42replace values. It asks if I want to
- 5:28:44insert a step. I do. I have this value
- 5:28:46selected, so it automatically put in
- 5:28:48there. I don't want it. What I want is
- 5:28:50comma space and and we're going to
- 5:28:53replace it with a comma and then go.
- 5:28:56Okay. Okay. So, that step did it just
- 5:28:59fine, right? It's looking good. And then
- 5:29:01we have our next replace values. And
- 5:29:04that one replaces the commas in the just
- 5:29:07and alone. And I can just inspect this
- 5:29:09by looking inside of here. Looking
- 5:29:12pretty good. And now I can use this
- 5:29:16split column. And specifically we want
- 5:29:18we can split by a number of different
- 5:29:20things, number of characters, positions,
- 5:29:23whatnot. We're going to be doing it by
- 5:29:24delimiter because a comma is a
- 5:29:26delimiter. So we're going to select or
- 5:29:28enter that comma. You can do leftmost,
- 5:29:31rightmost, or each occurrence, right? We
- 5:29:34could have multiple different values. So
- 5:29:35we want each occurrence. And for this,
- 5:29:38we want to go into rows. We want to put
- 5:29:41it underneath each other uh uh
- 5:29:43underneath itself. We're actually going
- 5:29:44to demonstrate columns after this, but
- 5:29:46for the time being, this is actually
- 5:29:48what is our solution going to be. So
- 5:29:50we're going to click okay. And bam. Not
- 5:29:52too bad. We have Well, let's actually
- 5:29:55inspect it. go to uh go to view and then
- 5:29:59column profile. Look at this. We have
- 5:30:01these multiple different values in here.
- 5:30:04But if you look at it, some of these
- 5:30:06like we have internship twice and we
- 5:30:09also have temp work twice and contractor
- 5:30:11twice. Why is that? Well, the issue
- 5:30:14resolves in if I select something like
- 5:30:16part-time, I can see this right with
- 5:30:18part-time there's actually an empty
- 5:30:21space right before this. Not a big deal.
- 5:30:25This is really easy to clean up
- 5:30:27underneath transform. We're going to go
- 5:30:29into once again text columns format and
- 5:30:32we want to trim this trim these values.
- 5:30:37Basically remove any white space on the
- 5:30:38left or right hand side. Now when we go
- 5:30:41in to look at this column profile,
- 5:30:43there's only six unique values. I can
- 5:30:45actually do the entire data set. And
- 5:30:47looking at everything, there's actually
- 5:30:49one additional this one of volunteer.
- 5:30:51And it looks like it's uh very minuscule
- 5:30:53compared to all the rest. But at least
- 5:30:56with this we confirm we have just unique
- 5:30:58values. Now this is the final form of
- 5:31:00our dimensional table. Everything is
- 5:31:02good to go.
- 5:31:06Now I do want to quickly demonstrate
- 5:31:08splitting columns. We split columns into
- 5:31:10rows. We're going to split into columns.
- 5:31:12This by no means is necessary for you to
- 5:31:15do. I just want you to have an
- 5:31:16understanding that there are different
- 5:31:17options to actually split columns. So,
- 5:31:20I'm going to remove these last few
- 5:31:23steps. If you don't feel comfortable
- 5:31:24following along with this, don't feel uh
- 5:31:26feel like you're necessary to anyway.
- 5:31:28We're going to go back to the step where
- 5:31:29we've had it necess or have it set up
- 5:31:31properly where the commas for all the
- 5:31:33different values are in the right
- 5:31:35spaces. Also, it's doing column profile
- 5:31:37on the entire data set. I'm just going
- 5:31:38to check this back to 1,00 rows. That
- 5:31:40way, it loads a little bit quicker.
- 5:31:42Anyway, underneath the home tab, we're
- 5:31:44going to split column. Once again, we're
- 5:31:45going to split by delimiter. Remember we
- 5:31:48did this by a comma and we did each
- 5:31:51occurrence. Now under advanced options,
- 5:31:53it's actually selected by default to be
- 5:31:56a column and the number of columns to
- 5:31:58split into is set. They put it in here
- 5:32:01of three because looking at those three
- 5:32:03rows, that's what it assumes it needs to
- 5:32:05be. I mean, looking at those a thousand
- 5:32:08rows, it looks like there's only three
- 5:32:09values at max or three commas at max. So
- 5:32:12that's why it has the suggestion of
- 5:32:13three. Anyway, let's go ahead and split
- 5:32:16this way. And what we can see is okay
- 5:32:18job zero has three values whereas job
- 5:32:21one has only one value and then null for
- 5:32:23the rest. This is still technically
- 5:32:27usable. We just have to unpivot the
- 5:32:30data. If I go underneath the transform
- 5:32:33tab and select underneath here, I can
- 5:32:36hear see here that we have unpivot
- 5:32:38columns which with the popup that it
- 5:32:40comes it says it translates all but the
- 5:32:42currently unselected columns into
- 5:32:46attribute and value pairs. Now we have
- 5:32:49job ID selected. So we actually want the
- 5:32:51opposite unpivot other columns.
- 5:32:54Translate all but the currently selected
- 5:32:55columns into attribute value pairs. And
- 5:32:58what does it mean by attribute value
- 5:33:00pairs? Well, let's look at it. Inside of
- 5:33:02here, we have our values, which are the
- 5:33:05different job schedule types now. And
- 5:33:08the attribute was that former column
- 5:33:10name, which I can go back into split
- 5:33:12column delimiter. These were the
- 5:33:14different column names. They are now
- 5:33:16underneath the attribute. So remember,
- 5:33:18we only want to have two columns for
- 5:33:20ours. I can select this, go into home,
- 5:33:23go to remove this column, and then under
- 5:33:26the value, remember we don't want that
- 5:33:28name. We could change it to job schedule
- 5:33:30type. And then I can see just looking at
- 5:33:32part-time that there is a white space
- 5:33:35before and after this. So going into
- 5:33:37transform, I can go into format and
- 5:33:40trim. And now we have it in the same
- 5:33:42manner that we had it previously,
- 5:33:44although we had to do a heck of a lot
- 5:33:46more different steps. I wanted to cover
- 5:33:48that mainly for the aspect of the
- 5:33:50unpivot columns as you may receive data
- 5:33:53in this format right here basically in a
- 5:33:56pivot table format and you'll need to
- 5:33:58unpivot it in order to get it into this
- 5:34:01format. So pivoting and unpivoting is a
- 5:34:04super useful technique to know about.
- 5:34:06Anyway, I'm going to remove all these
- 5:34:07steps, split the column by delimiter,
- 5:34:09specifying it's a comma, and then we're
- 5:34:11going into rows, and then formatting
- 5:34:13this comma to actually or formatting
- 5:34:15this column to trim up the white space.
- 5:34:17We'll leave it like this cuz this one
- 5:34:18easier. This is good to go. Let's close
- 5:34:20and load it in to analyze it.
- 5:34:25That's pretty cool. Once we loaded it
- 5:34:27in, schedule dim the dimensional table
- 5:34:30automatically created a relationship to
- 5:34:32job postings fact. If it didn't do this,
- 5:34:34I can delete this relationship and just
- 5:34:36drag job ID over to here. Ensure that
- 5:34:39it's selected to connect between these
- 5:34:41two. It's a many to one relationship.
- 5:34:43Maintaining it single for now. #spoiler
- 5:34:46alert. And bam. So, let's get into
- 5:34:48analyzing this. I'm going to create a
- 5:34:50new page. And let's start off simple. We
- 5:34:53just want to analyze the count of the
- 5:34:55different job schedule types. So, I'm
- 5:34:58going to drag from the SC schedule dim
- 5:35:00the job schedule type into the Y-axis.
- 5:35:03And then from the job posting fact
- 5:35:05table, we want to count that job ID for
- 5:35:07all those unique job postings and get a
- 5:35:09count. Now going into focus mode, we're
- 5:35:12going to see there's a problem with this
- 5:35:13that we noticed before that we may have
- 5:35:15noticed before. Well, it's actually two
- 5:35:17problems with this. First of all,
- 5:35:18there's blank values, null values in
- 5:35:21here. I don't like that. The second is
- 5:35:24that look at the counts of this for
- 5:35:25contractor. It's 478,000. Basically,
- 5:35:28every single row is being attributed to
- 5:35:30that. Why is that? Well, let's inspect
- 5:35:33from the model view. Remember schedule
- 5:35:35dim, we're using job schedule type and
- 5:35:39we're trying to filter in the direction
- 5:35:42of the job ID. Right now, look at where
- 5:35:45this arrow is point. It's pointing
- 5:35:47towards the schedule dim. So, it's
- 5:35:49preventing us from actually filtering in
- 5:35:51the direction we need to filter to get
- 5:35:53the count from this table. So, how do we
- 5:35:57fix this? Well, we can rightclick it, go
- 5:35:59to the properties, and we can change
- 5:36:01this cross filter direction right from
- 5:36:03single to both to where now once we save
- 5:36:07it, we can see that job schedule type
- 5:36:09should be allowed to filter the job ID
- 5:36:11in this direction. Now, going back to
- 5:36:13report view, it is looking good. The
- 5:36:16only thing I do not like with this is
- 5:36:18this null value. Now, I could go apply a
- 5:36:21filter and remove job, uh, remove this
- 5:36:24blank value right here, but I'm going to
- 5:36:26have to do that for every time I make a
- 5:36:28visualization with this. Instead, the
- 5:36:30best bet to do is go back into Power
- 5:36:32Query and looking at that schedule dim,
- 5:36:35we want to remove the blanks. Now, I
- 5:36:39will caution on this cuz this may be an
- 5:36:42approach you may try to take. You can
- 5:36:43select remove rows and they have this of
- 5:36:47remove duplicates, remove blank rows and
- 5:36:50remove errors. So in our case, let's try
- 5:36:51to remove blank rows. Well, whenever I
- 5:36:55go here and select this down arrow, I
- 5:36:58still have blank values in there. So
- 5:37:01technically, it's not filtering for the
- 5:37:04type of blank values that are located
- 5:37:06inside of here that are actually
- 5:37:08technically null values. Anyway, I'm
- 5:37:10going to remove this step of remove
- 5:37:11blank rows because it didn't work
- 5:37:13anyway. And the best way to filter for
- 5:37:15this is just uncheck blank inside of
- 5:37:19here and then click okay. And it adds a
- 5:37:23step for filtered rows to remove this.
- 5:37:26Also, we can see that this green bar now
- 5:37:27takes up the entire length of this. So,
- 5:37:30I know it worked fine. Click close and
- 5:37:32apply. Once it loads in the data, boom,
- 5:37:35it removes that blank value. So, now we
- 5:37:38can do something like this. Since both
- 5:37:39of these are set up, instead of just
- 5:37:41doing job count, we can also do the
- 5:37:44median salary, changing this to median.
- 5:37:47And we can see things like, oo,
- 5:37:48part-time pays better than full-time.
- 5:37:51So, that's another unique thing that we
- 5:37:53found out about this. Not only do yearly
- 5:37:55salary jobs pay better than hoursly, but
- 5:37:58part-time jobs are paying better than
- 5:38:00full-time jobs.
- 5:38:04Let's get into the second portion of
- 5:38:05this, which should be a little bit
- 5:38:06quicker. We're going to go into focus
- 5:38:08mode. Remember, we're trying to clean up
- 5:38:10now, as we demonstrated earlier, what
- 5:38:12are the top skills and data,
- 5:38:13specifically those different skills. We
- 5:38:16want to add the proper capitalization
- 5:38:19for each of these as necessary. This
- 5:38:22however is going to take a little bit
- 5:38:23more cleanup because if we navigate to
- 5:38:26our final file we can see that yeah some
- 5:38:28of them do just start with only one
- 5:38:30capital letter like Python but then you
- 5:38:32have things like SQL and AWS which are
- 5:38:34all capitals letters or you even have
- 5:38:37something like PowerBI where the last
- 5:38:39two letters are all capital letters.
- 5:38:41Anyway, back in our file where we want
- 5:38:43to actually modify this. Let's jump into
- 5:38:45cleaning this up. We're going to be
- 5:38:47cleaning up specifically the skills dim
- 5:38:50table and this skills column right here.
- 5:38:53So, as we've seen before underneath the
- 5:38:54transform tab, we have the option to
- 5:38:57format different values. In this case,
- 5:39:00text values. We could make our skills
- 5:39:01all lowercase, which they all are, or we
- 5:39:03can make it all uppercase in this case,
- 5:39:05or we can even capitalize each word,
- 5:39:08which is actually what we want to do for
- 5:39:10the first step. So, I'm going to go
- 5:39:12ahead and remove this uppercase text one
- 5:39:15cuz we're not going to keep that one.
- 5:39:16All right. So, that's a good first step.
- 5:39:18But now, if we look at values like SQL,
- 5:39:21it's not proper. We would expect to be
- 5:39:24all caps for SQL. And there's only a
- 5:39:27handful of other names in here that I
- 5:39:29actually do want to clean up, such as
- 5:39:32NoSQL, PowerBI, DAX, of course, DAX, and
- 5:39:36we'll give some love to SAS. So let's
- 5:39:38just start with PowerBI first. We're
- 5:39:41going to be using a conditional column.
- 5:39:44Unfortunately, there's nothing under
- 5:39:46transform for this. So we have to add a
- 5:39:48new column. And we can come up here into
- 5:39:52conditional column. Our current column
- 5:39:54is called skills. So we'll say that this
- 5:39:57new column is called skills clean. Now
- 5:40:00we need to go through and fill out this
- 5:40:02basically if statement. So if column
- 5:40:05name if skills equals in our case
- 5:40:10powerbi you have to give the correct
- 5:40:13proper uh punctuation for that that you
- 5:40:15expect to see. We want it to be powerbi
- 5:40:18with two capital letters for this. And
- 5:40:20then from there we'll go ahead and just
- 5:40:22click okay. This has a couple errors.
- 5:40:25Specifically one none of the values
- 5:40:28transfer. So everything's null, but our
- 5:40:30beloved PowerBI is transferred just
- 5:40:33fine. So let's go back into editing
- 5:40:35that. I can go to that step of add
- 5:40:37conditional columns, click that settings
- 5:40:39icon, and the first thing I want to do
- 5:40:41is so we have this if and then we have
- 5:40:43an else. And right now it's set to the
- 5:40:45value of null and that's why it's all
- 5:40:48null. Instead, we want to select a
- 5:40:50column, specifically the column of
- 5:40:53skills. Now, whenever we do this of
- 5:40:55okay, all these columns are filled in
- 5:40:57along with PowerBI. I'm also noticing
- 5:41:00that there's a PowerBI without a space
- 5:41:03in it. I'm going to fix this one as
- 5:41:05well. So, we can go back into modifying
- 5:41:08this column. We can add a clause in
- 5:41:12here. We want to look in the skills
- 5:41:14column equals PowerBI all lowercase. And
- 5:41:17I'm just going to copy this above and
- 5:41:19paste this in here. Click okay. And this
- 5:41:21one is now fixed. Okay. Next, remember
- 5:41:24also we want to change SAS. So, I'm
- 5:41:26going to go into here, add another
- 5:41:28clause, skills equals SAS, and change
- 5:41:32this to all caps, and go ahead, click
- 5:41:34okay. Remember, the other one we want to
- 5:41:37do was SQL. But I'm going to actually
- 5:41:40recommend a different approach besides
- 5:41:42conditional columns because look, we
- 5:41:44have things like SQL here. We have NoSQL
- 5:41:47here. We have TSQL down here. Once
- 5:41:50again, no SQL SQL server. Anyway,
- 5:41:53there's a bunch of different SQLs in
- 5:41:55here. Conditional columns aren't going
- 5:41:57to be able to fix that specifically
- 5:41:59those cases without replacing the entire
- 5:42:02contents. Instead, with that skills
- 5:42:04clean column, I want to replace values.
- 5:42:07And so, in cases where they have capital
- 5:42:10SQL, I want to have SQL in all caps. So,
- 5:42:14replaced up here. And then let's also
- 5:42:16replace these other conditions of like
- 5:42:18no SQL. So once again, we can do replace
- 5:42:20values SQL all lowercase. We'll do
- 5:42:23capital SQL. Click okay. And bam. This
- 5:42:27is looking a lot better. Now, there's a
- 5:42:30bunch of other letters in here that you
- 5:42:32can feel free to go through and clean
- 5:42:33up, but I'll leave that for you. This is
- 5:42:36good enough for what I need. I do,
- 5:42:38however, want to clean up these columns.
- 5:42:41This is just unnecessary amount of
- 5:42:43different columns in here. So, I don't
- 5:42:45want two skills and skills clean. What
- 5:42:48I'll do is I'm going to remove the
- 5:42:50skills column. And then with skills
- 5:42:53clean, we're going to just rename that
- 5:42:56to skills. Also, not a fan of this
- 5:42:58order, so I'm going to drag it over.
- 5:43:00This is looking good. We'll go ahead and
- 5:43:03close and apply. Now, looking at these
- 5:43:06skills, let's go into focus mode for top
- 5:43:09skills. We can see that all these values
- 5:43:13are now properly formatted. Not too bad.
- 5:43:16So it shows the power of power query and
- 5:43:20even doing simple thing like this like
- 5:43:22text cleanup. And remember because all
- 5:43:25of these steps are in power query if we
- 5:43:28ever have to refresh our data source
- 5:43:30it's going to be still running through
- 5:43:32the same data cleaning process. And so
- 5:43:35after actually going through that it
- 5:43:37still will apply it and you're going to
- 5:43:38have your cleaned up values. All right
- 5:43:41it's now your turn to give it a try. We
- 5:43:42have some practice problems around
- 5:43:44practicing with splitting column by rows
- 5:43:46and also columns and then also how to
- 5:43:49create conditional columns. With that,
- 5:43:51I'll see you in the next lesson. We're
- 5:43:52going to be getting into how to append
- 5:43:55and also merge data sets. With that, see
- 5:43:58you there.
- 5:44:03Welcome to this second to last lesson in
- 5:44:05Power Query. We're going to get deeper
- 5:44:07and deeper into more advanced features.
- 5:44:09Specifically in this one, we're going to
- 5:44:10be going over two major concepts.
- 5:44:13Specifically, how to append queries.
- 5:44:16Basically, put queries that have similar
- 5:44:18columns together on top of each other.
- 5:44:21And then merge queries, which is
- 5:44:23basically connecting two tables that
- 5:44:26have similar maybe column ids and then
- 5:44:29merging them together. We'll also have a
- 5:44:31bonus topic after the merge section
- 5:44:33jumping into how to perform group by
- 5:44:36analysis which is very similar to
- 5:44:39basically pivoting our data.
- 5:44:44So jumping into our append example, we
- 5:44:46navigate into our project folder under
- 5:44:48data. We can see we have this data set
- 5:44:50called job postings monthly. I'm going
- 5:44:53go ahead and open it up. Now this is
- 5:44:55really common how my co-workers love to
- 5:44:58send me data in that in this we have all
- 5:45:01these different sheets within this
- 5:45:03workbook and each sheet is a different
- 5:45:06month. It's in very important to note
- 5:45:08that these sheets all have the same
- 5:45:12column format meaning they all go to
- 5:45:14column Q they maintain the same column
- 5:45:17titles and I can verify this by going to
- 5:45:20another thing saying that it also goes
- 5:45:22to Q. Anyway, we want to use append to
- 5:45:25make all 12 of these sheets here into
- 5:45:29one single table. And we could do this
- 5:45:32with Power Query. For this example only,
- 5:45:35we're going to be starting with a blank
- 5:45:37workbook because after we get done with
- 5:45:38this, we're not going to keep it any
- 5:45:40further. The only point of this is to
- 5:45:42demonstrate how to do append. Anyway,
- 5:45:44start a blank report. Let's bring this
- 5:45:46data into Power Query now by going to
- 5:45:48get data. We're going to be getting this
- 5:45:50from Excel workbook. I guess I could
- 5:45:52also click it right there. Inside of our
- 5:45:53course project folder, I'm going to
- 5:45:55navigate into data and select job
- 5:45:56postings monthly and select open. Inside
- 5:45:59of here, I have my Excel workbook and I
- 5:46:02have all the different sheets. I need to
- 5:46:03now go through and I want all this data.
- 5:46:05So, I'm going to select it all. From
- 5:46:07there, we have the option to load it all
- 5:46:09or get into Power Query. So, I'm going
- 5:46:11to do that and select transform data.
- 5:46:13So, looking in our queries pane, we can
- 5:46:15see that all 12 of the sheets are loaded
- 5:46:18into here. And I can also verify by
- 5:46:20scrolling on over. Looks like all the
- 5:46:21data is there. Looks good enough for me.
- 5:46:23Now we want to combine these queries
- 5:46:25conveniently under the home tab. I can
- 5:46:26come over here into combine. Select the
- 5:46:29drop down. We have a few different
- 5:46:31options. We have merge. We're
- 5:46:33demonstrating append. I don't know if we
- 5:46:35can zoom in on this and see that append.
- 5:46:37Basically we're appending on all the
- 5:46:39different tables. With this clicking
- 5:46:41this dropown, we can append queries or
- 5:46:43append queries as new. Basically a new
- 5:46:46query. If I do append queries with that
- 5:46:48December 2024 selected, it's going to do
- 5:46:51the modifications inside that current
- 5:46:54query. So in this case, if I were to
- 5:46:55just append on January in this case,
- 5:46:58it's going to append it on to that
- 5:47:00query. And that's not necessarily what I
- 5:47:02want. Instead, what I'm going to do is
- 5:47:04come up here to a a combine, select
- 5:47:06append queries, append queries as new to
- 5:47:09a new query. You can do two tables or
- 5:47:12three or more tables in our case. And
- 5:47:13then we need to move all the ones we
- 5:47:15want over to the other side. In my case,
- 5:47:18I accidentally added December twice. So
- 5:47:21make sure you don't do that as all you
- 5:47:23got to do is just select remove. And now
- 5:47:25all the ones were selected. Go and
- 5:47:26select okay. Now here we have our append
- 5:47:29query. If I look at the source step by
- 5:47:31just open this up, we can see that all
- 5:47:33we're doing is combining all these
- 5:47:35different other queries. We're going to
- 5:47:37name this as data jobs append. Now,
- 5:47:42before we get into closing and loading
- 5:47:44this, we don't want to close and load
- 5:47:47all these other queries in here. Also, I
- 5:47:50don't really like the organization of
- 5:47:52this. What I'm going to do is I'm going
- 5:47:53to select all of these and hold control
- 5:47:55to select all the different monthly
- 5:47:57queries. And then I'm going to
- 5:47:58rightclick it and select move to group.
- 5:48:02We're going to create a new group for
- 5:48:03this and call this data jobs monthly.
- 5:48:06Real original. Okay. So now it makes it
- 5:48:08a lot easier to hide these queries. And
- 5:48:11then the other query, if you will, the
- 5:48:12data jobs append is inside other
- 5:48:15queries. All right, one last thing,
- 5:48:17right? That the one that I actually
- 5:48:18really care about is I don't want to
- 5:48:20load this. So I'm going to rightclick
- 5:48:22one of the queries and I'm going to
- 5:48:25uncheck enable load and it's going to go
- 5:48:27to italics. So know that to sign
- 5:48:29symbolize that that's what happened.
- 5:48:31Then once we did it all for these, I'm
- 5:48:33going to hit close and apply. So we can
- 5:48:35load it in and only that one query is
- 5:48:37loaded in. You will notice it will
- 5:48:39evaluate the other ones because it needs
- 5:48:41to evaluate them and go through them,
- 5:48:42but only one will load. Inside the data
- 5:48:44pane, we can see that one is loaded in.
- 5:48:46As always, we should go into table view
- 5:48:48and verify that yep, everything's
- 5:48:50looking like it's right. I can also see
- 5:48:52there that we have 479,000
- 5:48:55rows, which is the number we would
- 5:48:58expect to see for all our different data
- 5:49:00jobs posting. Just so it doesn't go
- 5:49:01without saying this data is exactly the
- 5:49:04same that we've operated previously
- 5:49:05with. I just broke it up into different
- 5:49:07sheets. Anyway, with this just verifying
- 5:49:10it, I can throw in something like a line
- 5:49:12chart. Minimize this filters. Then put
- 5:49:14job posted date on the x-axis and then a
- 5:49:17count of jobs in the y-axis. Remember,
- 5:49:19we got to drill down. We can see this on
- 5:49:21a quarterly basis, monthly basis, and
- 5:49:24then daily basis. and inspecting. It
- 5:49:27doesn't look like there's any gaps
- 5:49:28between January all the way to December.
- 5:49:34Now that we have a pen down, let's move
- 5:49:36into merge, which is slightly more
- 5:49:40complex. Okay, so this is usually the
- 5:49:43use case that I find for it. Remember,
- 5:49:46we have our data in this format.
- 5:49:48Specifically, we have our fact table
- 5:49:50here and then our other dimensional
- 5:49:51tables. Let's say now we need to give
- 5:49:55this data to our boss, but they haven't
- 5:49:58watched this tutorial. So, they don't
- 5:49:59know the difference between fact and
- 5:50:00dimensional tables or how to establish
- 5:50:02relationships. They just want a flat
- 5:50:04table with everything on it. And this is
- 5:50:07the table that we're going to create
- 5:50:09with this specifically. You can see from
- 5:50:11it, it looks very similar to our job
- 5:50:13postings fact table. But if I scroll all
- 5:50:16the way to the right, it also has all
- 5:50:19those skills and then also that skill
- 5:50:21type in it. What we're going to do is
- 5:50:24merge the data set. Now, it's important
- 5:50:26to remember this. So, look at this
- 5:50:28table, right? The job skills flat. It is
- 5:50:31now 2.3 million rows. If we go back to
- 5:50:35job posting fact, it's 478,000.
- 5:50:40Why is that? Well, whenever we merge it,
- 5:50:42so going back to that flat table, we can
- 5:50:45see like in this case, these job IDs are
- 5:50:47repeating. So, this is a repeating job
- 5:50:50posting in order to capture all the
- 5:50:53different skills on different rows. So,
- 5:50:55something to think about whenever we get
- 5:50:57to the end of this. Anyway, let's jump
- 5:50:59into doing this. So for the file for
- 5:51:02this and the remaining portion of this
- 5:51:03lesson, you can use what we had from the
- 5:51:06previous lesson on advanced
- 5:51:07transformations or you can just open up
- 5:51:10this file in the project folder on
- 5:51:11advanced transformations and use that.
- 5:51:13Our final results are going to be in
- 5:51:15that 3.5_merge.
- 5:51:17So let's jump into it. Remember we want
- 5:51:19to combine our job postings fact table
- 5:51:22with our skills. Because of this, we
- 5:51:24have to merge in this connector uh table
- 5:51:28first and then in our finally skills dim
- 5:51:30table. So, it's going to be more of a
- 5:51:32multi-step process. In order to do this,
- 5:51:34you know what we got to do? Go into
- 5:51:36power query editor. So, let's jump into
- 5:51:38our first step. We're going to want to
- 5:51:40connect our job postings fact to skills
- 5:51:42job dim. So, we have the job postings
- 5:51:44fact connected. I can come up here in
- 5:51:46the home tab to combine. And we have
- 5:51:48once again similar options of merge
- 5:51:50queries and merge queries as new. I
- 5:51:53don't want to affect our original job
- 5:51:55postings fact table. So I'm going to say
- 5:51:57merge queries as new. And it's going to
- 5:52:00say, hey, select the tables and matching
- 5:52:02columns to create a merge table. We do
- 5:52:04want the job postings fact table. And
- 5:52:05then we want the skills job dim. What
- 5:52:08are we going to be connecting them on?
- 5:52:10Well, the job ID. So we need to make
- 5:52:12sure we select both of those. Now, what
- 5:52:15do we select next for the join kind?
- 5:52:19There are underneath here six different
- 5:52:21ones that we have. So, we're going to
- 5:52:23walk through each of these six different
- 5:52:25types of joins. And in order to do this,
- 5:52:28it's important to understand we're going
- 5:52:30to be showing some visuals with it. And
- 5:52:32in this, we're going to be demonstrating
- 5:52:33how whenever you join table A to table
- 5:52:36B, what data is included and the visuals
- 5:52:40associated with this. And this
- 5:52:43represents with the shaded color in blue
- 5:52:45represents what data we're going to keep
- 5:52:47with this. Just to be clear, table A in
- 5:52:51our case is the job postings fact table
- 5:52:54and then table B is the skills job dim.
- 5:52:58So the first option is left outer and
- 5:53:01with that we're going to select all from
- 5:53:03the first and then matching from the
- 5:53:06second. So with that, this demonstrates
- 5:53:09that no matter what, everything from
- 5:53:11that table A, the job postings fact
- 5:53:13table is going to be included. And then
- 5:53:16in table B, only things that match up
- 5:53:19will be included. So that's why only
- 5:53:21that center portion is colored. Now with
- 5:53:24this, we can see down at the bottom, the
- 5:53:26selection matches 410,000 out of 478,000
- 5:53:30rows from the first table. Basically
- 5:53:32what this saying is 410,000 job postings
- 5:53:36have associated skill or skills with it.
- 5:53:39This is actually a perfectly fine join
- 5:53:41to use, but we need to talk about the
- 5:53:44other five still. Next up is a right
- 5:53:46outer and this does all from the second
- 5:53:48and then matching from the first. This
- 5:53:51is basically just opposite from the last
- 5:53:53one. Table B or our skills job dim.
- 5:53:57We're going to keep every single value
- 5:53:58from that and then only matching records
- 5:54:02from our leftmost table or that job
- 5:54:04postings fact table. Inspecting this
- 5:54:07down at the bottom, we can see that 2.2
- 5:54:09million out of 2.2 million rows from the
- 5:54:12second table are matched. But that's not
- 5:54:14the full story. Remember whenever we did
- 5:54:17left outer, it basically said that of
- 5:54:19the 478,000
- 5:54:21job postings, there were only 410,000
- 5:54:23that obtained that had skills. So what's
- 5:54:26happening now with this write outer is
- 5:54:29that there's about 68,000
- 5:54:32differences or job postings without a
- 5:54:33skill. Therefore, whenever we do this
- 5:54:35route out right outer, we would be
- 5:54:37missing those 68,000 jobs because they
- 5:54:39don't have a skill in our final join.
- 5:54:41Because of that, we're not going to use
- 5:54:43a right outer because we want all the
- 5:54:44job postings. Next up, we're going to
- 5:54:46skip over full outer and get into inner.
- 5:54:49In this, it only matches matching rows.
- 5:54:52Looking at this visually, we can see
- 5:54:54that okay, only the matching rows from
- 5:54:56table A and table B are going to be
- 5:54:59included in that. So if we remember from
- 5:55:01our write outer, what do you think is
- 5:55:03going to happen? Well, it tells us only
- 5:55:06410,000 of the 478,000 job postings are
- 5:55:10going to be included in this. If we
- 5:55:12scroll over, we also see that from the
- 5:55:14second table, all the skills would be
- 5:55:16included. So that makes sense with that
- 5:55:18because every single skill has an
- 5:55:20associated job posting. Anyway, we're
- 5:55:22not going to use enter for this. All
- 5:55:23right, next up is left anti. And in
- 5:55:26this, it is rows only in the first
- 5:55:29table. In this case, we're only going to
- 5:55:33be keeping those in table A, so the job
- 5:55:36posting facts table that have no
- 5:55:39correlated skill with it. And we confirm
- 5:55:42this by saying, hey, this selection
- 5:55:43excludes 410,000 of 478,000. So
- 5:55:48basically this is going to return 68,000
- 5:55:50job postings without any skills. This is
- 5:55:52completely useless at least in our case.
- 5:55:55Moving on to right anti. This one is
- 5:55:57going to have only rows only in the
- 5:55:59second. This is only going to include
- 5:56:02rows from the right table that do not
- 5:56:04have any matches in the left table,
- 5:56:06which means that there's no rows. And as
- 5:56:09we can see, the selection excludes all
- 5:56:11227,000 of the 227,000. Sorry, 2.2
- 5:56:15million. So no matches are going to be
- 5:56:18done with this one. Also completely
- 5:56:19useless in our case. All right, last one
- 5:56:22is full outer and that's going to be
- 5:56:24doing all rows from both. This one will
- 5:56:27recruit all results from table A and
- 5:56:30table B whether they match or not. In
- 5:56:32our case, we do know that table B
- 5:56:35matches all of table A. So whenever we
- 5:56:39do this, there's not going to be any
- 5:56:40problems. And actually this full outer
- 5:56:43in our case is basically the same thing
- 5:56:46as a left outer because like I said all
- 5:56:49the skills are associated with a certain
- 5:56:52job posting and it gives us that similar
- 5:56:54response of the selection matches
- 5:56:56410,000 out of 478,000
- 5:56:59that basically have skills and
- 5:57:00everything from the second table matches
- 5:57:02completely. We're going to go with this
- 5:57:04full outer. I'm going to click okay. So
- 5:57:06we have this merge data in. I'm going to
- 5:57:08go ahead and change this name from merge
- 5:57:10one to job skills flat. Also, you're
- 5:57:13going to notice with this, especially
- 5:57:15with this large of a data set, that when
- 5:57:18we start doing this, it takes a while to
- 5:57:20load. So, one of the drawbacks of doing
- 5:57:23merge in Power Query, if your computer's
- 5:57:25not robust enough to handle this, feel
- 5:57:27free to just watch along so you can gain
- 5:57:29the experience at least seeing what
- 5:57:31happens. No need to get frustrated
- 5:57:33because you don't have enough RAM in
- 5:57:34your computer to handle this. So now
- 5:57:37scrolling all over to the right, what we
- 5:57:39can see is that we did merge on that
- 5:57:42skills job dim table into our job
- 5:57:45posting flat table, which is all the
- 5:57:46columns to the left. But they merged it
- 5:57:49in with this in a table. I'm actually
- 5:57:51going to click on this just to show what
- 5:57:53it is. And it's going to navigate into
- 5:57:55this specific row of the table. And so
- 5:57:58what we can see from this is that we
- 5:58:00clicked into one row. That row was for
- 5:58:02the job ID of five. and it had all of
- 5:58:05these different skills associated with
- 5:58:08it. So, pretty cool. We can navigate
- 5:58:10into it. Overall, not too important. We
- 5:58:12need to actually do this step. We need
- 5:58:14to actually do this for all the rows.
- 5:58:17And we can do this by scrolling on over
- 5:58:19here. And up here at the top, there's
- 5:58:21this expand icon. Whenever I click it, I
- 5:58:25can either expand or I can also
- 5:58:27aggregate it based on the sum of these
- 5:58:29things in here, which is not what we
- 5:58:31want to do. We want to actually expand
- 5:58:32it out. And with this, it's going to
- 5:58:34give us the job ID and the skill ID.
- 5:58:36Remember, in job posting facts, we
- 5:58:38already have the job ID. So, I don't
- 5:58:40want to repeat it again here. So, I'm
- 5:58:42only going to import in the skill ID and
- 5:58:44click okay. It's now expanded out. And
- 5:58:47if I scroll on over, I can see now that
- 5:58:49these job postings are duplicated
- 5:58:52because this case, job ID is repeated
- 5:58:54multiple times for five, nine, and
- 5:58:57whatnot. But we're not done. Remember,
- 5:58:59we just connected the job postings fact
- 5:59:01table to SC skills job dim. We still
- 5:59:04need to connect to the skills dim table.
- 5:59:07Because of that, we need to do another
- 5:59:08merge. With job skills flat table
- 5:59:11selected, I'm going to go into the home
- 5:59:13tab. I'm going to combine and we need to
- 5:59:15merge. Again, I don't need to create a
- 5:59:17new query. We can continue working in
- 5:59:19this one. So, we're just going to do
- 5:59:20merge queries. Now for this one from the
- 5:59:23job skills flat table we want to connect
- 5:59:26on that skill ID on skills job dim and
- 5:59:29we want to connect to the skills dim
- 5:59:32table on that skill ID. So for this join
- 5:59:36which one do you think we're going to
- 5:59:38use for this in the fact that we want to
- 5:59:40keep everything from the job postings
- 5:59:42fact table while also putting all of our
- 5:59:45skill information into this table. Well,
- 5:59:48with left outer, what we're seeing is
- 5:59:50that we're going to match 2.2 million
- 5:59:53out of 2.3 million rows from the first
- 5:59:56table. And why is there a difference in
- 5:59:59this? Well, it has to do with the fact
- 6:00:01that there are some jobs that don't have
- 6:00:03a skill. In our case, this left outer is
- 6:00:07going to work. And also, we can see we
- 6:00:09get the same output for full outer. In
- 6:00:11this case, once again, both of those are
- 6:00:13perfectly fine to use. I'm going to go
- 6:00:14ahead and click okay because I know it's
- 6:00:16going to preserve all the job postings
- 6:00:18in the first table and just match up
- 6:00:20those skills for all those that should
- 6:00:22have a match. Now that we have this
- 6:00:24skills dim added once again it's going
- 6:00:27to provide it in a table like format. I
- 6:00:29can click into it so we can investigate
- 6:00:31it. You don't need to do this portion
- 6:00:33but what I would expect to see is since
- 6:00:35this is only zero we should only see the
- 6:00:37skill for zero. And ding ding ding
- 6:00:40that's what we got. Zero SQL and it's
- 6:00:41the type programming. All right, I'm
- 6:00:43gonna get rid of this. I was just doing
- 6:00:44that for demo. So, what we need to do is
- 6:00:46come up here to that skills dim table
- 6:00:48and actually expand it. Once again, we
- 6:00:51have a skill ID already in there. We
- 6:00:52don't want that. We're going to uncheck
- 6:00:54that and then expand out the other two
- 6:00:56remaining columns. All right, not too
- 6:00:59bad. We have this in here. I just want
- 6:01:01to do a little bit of cleanup.
- 6:01:03Specifically, I don't need this skill ID
- 6:01:05column. So, I'm going to end up removing
- 6:01:07that column. And then we're going to
- 6:01:08rename both this and instead of being
- 6:01:11skills dim skills, it's just going to be
- 6:01:12skills. And I'll change this one to
- 6:01:14skill type. Now we're complete and we've
- 6:01:17cleaned up this table, this job skills
- 6:01:19flat. We're going to now load this into
- 6:01:21PowerBI and just visualize it to make
- 6:01:23sure that it's working correctly. But I
- 6:01:25do want to show something specifically.
- 6:01:27We just created a new table. And this
- 6:01:29table has like 2.2 million rows in it.
- 6:01:31It's a lot bigger. Anyway, our current
- 6:01:33file for 3.4 for advanced
- 6:01:35transformations that I'm working right
- 6:01:36now is 39 megabytes or 39,000 kilobytes.
- 6:01:41Let's see how big it gets after we save
- 6:01:43the file. So, first I'm going to close
- 6:01:45and load it. And now it's loaded in. As
- 6:01:48we can see here, I'm going to go ahead
- 6:01:50and now save this file. Navigating back
- 6:01:53to here. This bad boy went from 39
- 6:01:56megabytes to 76 megabytes or 76,000
- 6:02:01kilobytes. It basically doubled in size.
- 6:02:04So something to think about whenever
- 6:02:05you're building these type of files. It
- 6:02:07is going to make your file size a lot
- 6:02:08bigger, make it even harder to share.
- 6:02:10Anyway, one thing that's going on here
- 6:02:12which is really weird and I don't want
- 6:02:13it to do is this job postings flat table
- 6:02:16has relationships with the job ID of the
- 6:02:19job posting fact and then it has this
- 6:02:21secondary one with the company ID of
- 6:02:24this company dim. This dotted line means
- 6:02:26that it's not the primary relationship.
- 6:02:29Anyway, I don't want any of these. I'm
- 6:02:30going to delete both these relationships
- 6:02:33in here because we don't want that. I'm
- 6:02:35going to create a new page called merge.
- 6:02:37And we're just going to demo real quick.
- 6:02:38Make sure we have the correct data in
- 6:02:40here. Specifically, what are the top
- 6:02:42skills and data? I'm going to uh copy
- 6:02:44that. And I'm going to paste that in
- 6:02:46here. And I put some text boxes in here
- 6:02:48just to keep track. Right. This side
- 6:02:50over here, we're going to be analyzing
- 6:02:52the star schema data that we use from
- 6:02:54the job postings fact table and the
- 6:02:55skills down. We now want to see what our
- 6:02:58data looks like in job skills flat. So
- 6:03:01I'll remove both the Y and the X- axis.
- 6:03:04Navigate into job skills flat. For the
- 6:03:06Y-axis, we'll drive drop in skills. And
- 6:03:10for the X-axis, we're going to do a
- 6:03:11count. We want to do a count of the job
- 6:03:14IDs. So I need to change this over to
- 6:03:16count. Okay. The purpose of this was to
- 6:03:19well verify. Is it the same? So skills
- 6:03:21are at 244,416
- 6:03:23for Python and 244,416.
- 6:03:26So this flat table is good. The only
- 6:03:28thing we have to remember, right, is
- 6:03:30navigating to this table view with job
- 6:03:32skills flat selected. There are, as you
- 6:03:35can see, multiple different job IDs
- 6:03:37because some jobs have multiple
- 6:03:40different skills. So whoever we give
- 6:03:41this data set to, they have to be sure
- 6:03:43that they know how they're analyzing it.
- 6:03:46Now, what is if we need to send this to
- 6:03:47our boss? Well, the easiest way is
- 6:03:50inside of this table view underneath
- 6:03:52data. We can write uh we can select
- 6:03:54those three dots. And from there, you're
- 6:03:56going to select copy table. And in my
- 6:03:59case, it took a couple minutes to copy
- 6:04:01it into the clipboard. Now, I'm going to
- 6:04:04go ahead and just paste it right here
- 6:04:06into a blank Excel spreadsheet. And
- 6:04:10silly me, it says the data set's too
- 6:04:12large, right? Cuz we had 2.2 million
- 6:04:14rows of data. There's only one million
- 6:04:17about 1 million rows in Excel. So, not
- 6:04:20all of it's going to go into here, but
- 6:04:22you get the idea. Scroll on down. Almost
- 6:04:24a million rows of data inside of here.
- 6:04:29All right, so moving into our second and
- 6:04:32really bonus round of using group eye.
- 6:04:34Let's say we get back from our boss that
- 6:04:36hey, he didn't like that you had to send
- 6:04:38him multiple different Excel files to
- 6:04:39get those 2.2 million job postings with
- 6:04:41all those skills. instead he just wants
- 6:04:43you to aggregate it all together and
- 6:04:45then give him those results. That way
- 6:04:47the table's much smaller. Well, we can
- 6:04:50use group by for this. So, let's
- 6:04:53navigate back into the power query
- 6:04:55editor. And we don't necessarily need to
- 6:04:58load this job skills flat table anymore
- 6:05:00because like I said, my boss doesn't
- 6:05:01really want it. So, we're going to
- 6:05:03uncheck enable load. It'll say, hey,
- 6:05:05there's potential possible data loss
- 6:05:07warning. Not worried about that. It
- 6:05:08ain't going to happen. But seriously,
- 6:05:10it's not. And we want to end up using
- 6:05:13this table to get an aggregation of
- 6:05:16things. We're going to end using under
- 6:05:18the transform tab group by. I could
- 6:05:21start by doing a group by here, but this
- 6:05:23is going to do it within the current
- 6:05:25query. I don't want to do that. So what
- 6:05:28we're going to do is we're going to
- 6:05:29create a new not duplicate, but
- 6:05:31reference query. Now, with this new
- 6:05:33query that I've renamed to job skills
- 6:05:36group by, we're going to perform group
- 6:05:38by. And we're going to keep it simple at
- 6:05:40first. I'm going to just we want to look
- 6:05:43at specifically that skills column. And
- 6:05:47with this, we just want a skill count.
- 6:05:50And so, this is going to count the rows.
- 6:05:53And we don't select the column because
- 6:05:54we're just counting the rows. We'll go
- 6:05:56ahead and click okay. And we can
- 6:05:58basically see that the data was now
- 6:06:00group by or if you will pivoted in that
- 6:06:02we're getting skill counts for all the
- 6:06:05different skills that we have. Now we're
- 6:06:07not limited just doing one column. I can
- 6:06:10go back into this group rows and I
- 6:06:13actually know that he wants more
- 6:06:15information more than just the skills
- 6:06:17specifically. He's curious of breaking
- 6:06:19down the count of skills based on not
- 6:06:22only the skills but also on something
- 6:06:24like the job title short column. And we
- 6:06:27can still do a skill count for this. I'm
- 6:06:30going go ahead and click okay. And now
- 6:06:32it's breaking down by skills and that
- 6:06:34job title short column. So this is going
- 6:06:36to be the final table we're export. But
- 6:06:38I want to show and demonstrate one thing
- 6:06:40specifically. If we were to go back into
- 6:06:42that group rows, we have to be very
- 6:06:44careful about how we're grouping and
- 6:06:46what we're aggregating by. Specifically,
- 6:06:49let's say we were trying to do the
- 6:06:51median value of something like the
- 6:06:54yearly salary. And we'll say this is a
- 6:06:57median salary. So this can be done and
- 6:07:00this is like I said showing that median
- 6:07:02salary. But what my boss is going to
- 6:07:04take and do is he's going to end up
- 6:07:07trying to most likely find out what is
- 6:07:10overall SQL. What is the median salary
- 6:07:12overall? And then you'd be taking a
- 6:07:14median of this median salary column. So
- 6:07:18whenever you start getting to other
- 6:07:19aggregations with group eyes, I don't
- 6:07:22recommend it because you're not going to
- 6:07:23get the actual results unless you look
- 6:07:25at the median for the entire data set.
- 6:07:28And this can be applied similarly if you
- 6:07:29were doing like an average salary and
- 6:07:31then try to take an average of an
- 6:07:32average. It's not going to work out to
- 6:07:34what you want. Long story short, if
- 6:07:36you're doing any type of aggregation or
- 6:07:38group by, I would leave it to things
- 6:07:40like count and also count distinct rows.
- 6:07:44Besides that, that's about it. So now we
- 6:07:46have the final table that we want. I
- 6:07:48have it loading in. We disenbled the
- 6:07:50load a job skills flat. I'm going to go
- 6:07:52in and close and apply this. We can see
- 6:07:54now that that job skills flat table's
- 6:07:56gone and we only have that job skills
- 6:07:58group by. And let's just see real quick.
- 6:08:00Remember we haven't saved just yet. So
- 6:08:02this file size is 76 megabytes as we're
- 6:08:05shown right here. Whenever I actually
- 6:08:06save this now with only the group by and
- 6:08:09removing that big old flat table, we get
- 6:08:11back down to basically 39 megabytes,
- 6:08:14which much smaller. Group eyes is a lot
- 6:08:17better. So once again, let's make sure
- 6:08:19that we're getting the correct results
- 6:08:20for our group by. And for this, we're
- 6:08:22going to be once again comparing it to
- 6:08:24that star schema data. So I can go into
- 6:08:26that skill stat, copy this bad boy, and
- 6:08:29then paste it right into here. I'm going
- 6:08:30to copy and also drag it over here.
- 6:08:33Remove the values inside of it. Add in
- 6:08:35skills to the y-axis and skill count to
- 6:08:38the x-axis and are we going to get the
- 6:08:41same results? Python 244,416
- 6:08:45Python 2444,46416.
- 6:08:48Now, what's also neat about this is
- 6:08:50because we kept that job title short in
- 6:08:51there. I can then even drag job title
- 6:08:54short into the small multitudes and it's
- 6:08:57showing a 4x4 grid or a 2 x two grid.
- 6:09:00I'm not really liking this. Under small
- 6:09:01multitudes under format visual, I can go
- 6:09:04to the number of columns and change it
- 6:09:05to one. And then for this visual, I just
- 6:09:09want to have a filter on the skills
- 6:09:10itself to only just show the top five
- 6:09:13filter or top five skills. We'll say top
- 6:09:15five. And I'll drag skill count into
- 6:09:18there to do sum of skill count. All
- 6:09:20right. Now, boom. Top five skills are
- 6:09:23AWS, Azure, Python, SQL, and Tableau.
- 6:09:27And we can actually scroll through and
- 6:09:28see it for all the other different job
- 6:09:31titles as well. One quick note, because
- 6:09:33we deleted that job skills flat table,
- 6:09:36this visualization that we built
- 6:09:38previously is not going to work for the
- 6:09:41flat table. So, we're going to have to
- 6:09:43go ahead and just delete this page. All
- 6:09:45right, you now have some practice
- 6:09:46problems to go through and get more
- 6:09:48familiar with using appends, merges, and
- 6:09:51also group buys. After that, we'll be
- 6:09:53jumping into our last lesson to do a
- 6:09:56deeper dive on the M language, which is
- 6:09:58what is powering Power Query. With that,
- 6:10:02I'll see you in the next one.
- 6:10:07All right, this is the last lesson on
- 6:10:09Power Query and we're jumping into a
- 6:10:11topic on the M language. Little sad that
- 6:10:14is the last one on Power Query cuz Power
- 6:10:16Quer is one of my favorite topics.
- 6:10:17Anyway, for this M language, don't be
- 6:10:20int uh intimidated because we're not
- 6:10:22going to be uh like programming experts
- 6:10:24by the end of this. Instead, I just want
- 6:10:27you to have a basic understanding of
- 6:10:29what is the purpose of this language
- 6:10:30that powers Power Query. And also, by
- 6:10:33the end of this, I'm going to give you
- 6:10:35some techniques with AI bots like
- 6:10:37ChachiBT in order to help you out if you
- 6:10:40ever find yourself nearing needing to
- 6:10:42modify an M language query.
- 6:10:47So what the heck is M language? Well, M
- 6:10:50language is Power Query's query language
- 6:10:54for basically data manipulation and
- 6:10:56transformation. It's what's under the
- 6:10:58hood in the Power Query editor that's
- 6:11:01actually doing all of our different ETL
- 6:11:04process or extract, transform, load.
- 6:11:06Now, it's important to understand we can
- 6:11:07interact with the guey of the Power
- 6:11:09Query editor and it just generates the M
- 6:11:11language itself. We don't necessarily
- 6:11:14need to actually do the M language or do
- 6:11:16the M language. We don't need
- 6:11:18necessarily type out the M language. And
- 6:11:20as we demonstrated, right? So in the
- 6:11:22case of our job postings fact table that
- 6:11:24we've been manipulating through this,
- 6:11:26right? We've gone through and applied in
- 6:11:28this case 1 2 3 4 five different steps.
- 6:11:31And we can see each of these steps. One,
- 6:11:34we can see it inside of the formula bar
- 6:11:36itself. So in this case, this change
- 6:11:38type step, it includes this entire step
- 6:11:41right here. Or we can even see all of
- 6:11:44the steps inside the advanced editor.
- 6:11:47And looking at this change type, this
- 6:11:49entire thing, this whole formula right
- 6:11:51here is the same thing that was in the
- 6:11:53formula bar on this single row. And we
- 6:11:56can see 1 2 3 4 five different rows in
- 6:12:00here for the five different steps. At
- 6:12:03the end of this video, we're going to be
- 6:12:05demonstrating how to actually move like
- 6:12:07query like this into another query. Say
- 6:12:11we have a new PowerBI file we're
- 6:12:13starting with and we just want this
- 6:12:14table alone. We're going to show you how
- 6:12:16to actually do this cuz I find it pretty
- 6:12:18common, but we'll save that for later.
- 6:12:22All right, for this lesson, we're going
- 6:12:24to be working in the same file as last
- 6:12:26time. Specifically, we're going to be
- 6:12:27starting off from that 3.5 merge. You
- 6:12:30can also just continue to work in that
- 6:12:32same PowerBI file. Doesn't really
- 6:12:33matter. Anyway, here I have it loaded. I
- 6:12:37do want to clean it up because remember
- 6:12:40in the last lesson we created this flat
- 6:12:43table and then also this group eye. We
- 6:12:45don't need any of that and we don't need
- 6:12:46any of these pages associated with it.
- 6:12:49First, I'm going get rid of those pages.
- 6:12:50So I'm just going to get rid of this job
- 6:12:52skills flat verify that I named job
- 6:12:54skills query verify that I named and
- 6:12:57then the group by analysis. From here in
- 6:13:00the home tab I'm going to navigate into
- 6:13:01transform data and we're going to get
- 6:13:03rid of both of these queries of the
- 6:13:05group by by deleting it selecting delete
- 6:13:08and then the flat table also of deleting
- 6:13:10that as well. So now let's get into one
- 6:13:12of my favorite features inside of Power
- 6:13:14Query and that's column from example.
- 6:13:17We're going to be doing an example.
- 6:13:19We're going to be modifying our job
- 6:13:20postings fact table even further. We're
- 6:13:23going to start simple first. We're going
- 6:13:24to navigate over here to the job posted
- 6:13:27date column which is actually
- 6:13:29incorrectly labeled, right? Should be
- 6:13:31job posted date time. So say we wanted
- 6:13:33to extract the date out of this. You
- 6:13:36already know you can use the transform
- 6:13:38tab and you could extract out the date
- 6:13:40using this method. We could also use add
- 6:13:42column to extract out the date. But the
- 6:13:44main purpose of showing this is under
- 6:13:46add column we also have this of column
- 6:13:50from example which we're going to be
- 6:13:52going over in this anyway we want to do
- 6:13:54this from the selection or in our case
- 6:13:56we want to extract out the date and so
- 6:13:59what I can do is just start typing and
- 6:14:01in this case I just put one and a bunch
- 6:14:04of different options popped up even more
- 6:14:08options I'll say than are available in
- 6:14:10the popup in the transform and the add
- 6:14:12column tab for just date itself. So
- 6:14:14that's why I recommend this because you
- 6:14:16can get a lot more options out of this.
- 6:14:18Anyway, I just want to get the date
- 6:14:20only. So I'm going to navigate and
- 6:14:22select this one right here of 111 2024
- 6:14:25and select it. And then whenever I press
- 6:14:28enter, everything else is going to
- 6:14:30autofill in. So what's happened is this
- 6:14:32is a light gray because I didn't do an
- 6:14:34an example here. And so I know that I
- 6:14:36entered it here. We're going to have
- 6:14:37other ones where we have to enter more
- 6:14:38than one example. Anyway, the reason why
- 6:14:40the name of this lesson is M language is
- 6:14:42because, well, we need to inspect to
- 6:14:44make sure that we're doing this
- 6:14:45correctly. So, anytime you're doing
- 6:14:47this, you need to look up here under
- 6:14:48transform and make sure that this M
- 6:14:50language here makes sense of what we're
- 6:14:53trying to do. You don't need to be an
- 6:14:55expert at reading it, but we can
- 6:14:56basically see that we're extracting the
- 6:14:58date from job posted date. Okay, that
- 6:15:01sounds about right. Sometimes this will
- 6:15:04give you bogus results that aren't what
- 6:15:06you want. and looking yep up here in
- 6:15:08this section is going to help you out.
- 6:15:10So, I'm good with this. I'm going to go
- 6:15:11ahead and click okay. I do want to
- 6:15:13change the name of this, but I want it
- 6:15:15to be job posted date. I can't name it
- 6:15:17to the same thing. We've seen that
- 6:15:18before. It gives an error. So, I'm just
- 6:15:19going to click okay. I want to now take
- 6:15:21this and I want it next to job posted
- 6:15:24date. So, I'm just going to drag it over
- 6:15:26here. Now, I'm going to rename this one
- 6:15:28to job posted date time and then this
- 6:15:31one that's date to job posted date. All
- 6:15:34right, let's do another demo. Maybe this
- 6:15:36will work out, maybe it won't. This one
- 6:15:38has to do with the job via column.
- 6:15:40Remember before we were doing replace
- 6:15:42values to remove that via space. Let's
- 6:15:44see if we can do this from column from
- 6:15:46example. With job via selected, I'm
- 6:15:48going to go to column from example and
- 6:15:49then from selection. I only wanted to
- 6:15:51use this column. Anyway, if I try to
- 6:15:54type in in this case voting reveal.com,
- 6:15:58pretty neat name, and press enter.
- 6:16:00Actually surprised. It looks like it
- 6:16:02actually did get it correct. Previously
- 6:16:04it wasn't getting this right and not too
- 6:16:07bad. Anyway, inspecting the M language.
- 6:16:09This is doing a transformation and what
- 6:16:12it says is text after delimiter in job
- 6:16:15via it's looking for a space. So
- 6:16:18basically it's looking for that space in
- 6:16:19there and it's keeping all the values
- 6:16:21after that. And so the case of BB
- 6:16:23Singapore which is multiple values, it
- 6:16:24just takes all of it after that first
- 6:16:26space. We'll say this is good enough for
- 6:16:28our case. I'm going to go ahead and
- 6:16:31click okay. Now that I'm thinking about
- 6:16:33it, this one I'm going to have to move
- 6:16:35over and then also rename. So, we're not
- 6:16:38going to end up using this one.
- 6:16:39Actually, I'm going to go ahead and X
- 6:16:41out of that. Instead, I'm just going to
- 6:16:43select job via, go to transform, replace
- 6:16:45values, and specifically replace the via
- 6:16:48space with a blank value. And this
- 6:16:51cleans it up in only one step. A little
- 6:16:52bit easier. All right. Next example I
- 6:16:54want to get to. I want to actually be
- 6:16:57able to combine the salary year average
- 6:17:00column with an adjusted value for the
- 6:17:03salary hour average column. Right now
- 6:17:05there's all null values right here.
- 6:17:07We're going to filter for the time being
- 6:17:09removing blanks while we're doing this
- 6:17:11just to make it easier for ourel, but
- 6:17:13I'm going to delete this step
- 6:17:14afterwards. Hope I don't forget. Anyway,
- 6:17:17we can't just combine these columns
- 6:17:19because like this case, this is 25 and
- 6:17:21this is 120,000. we need to adjust this
- 6:17:2425 uh first. Now, unfortunately, we're
- 6:17:26not going to be able to do column from
- 6:17:28example for this. We want to multiply
- 6:17:29the salary hour average by a value. So,
- 6:17:32that's why thankfully we're smart
- 6:17:34enough. We've done this already. We can
- 6:17:35just add a column using multiply.
- 6:17:38Specifically, remember we want to
- 6:17:40multiply times 52 weeks in a year times
- 6:17:4340 hours in a week, which is 2080. I'm
- 6:17:47going to click okay. And then for this
- 6:17:50one, right, we don't want to keep the
- 6:17:51name multiplication. So inside the
- 6:17:54formula bar, right, we're going to
- 6:17:55change this name of multiplication to
- 6:17:58salary hour adjusted. Clicking enter, we
- 6:18:01can see that it got updated there. Okay.
- 6:18:04But now that we actually have this
- 6:18:06column, let's now use as we can see that
- 6:18:0925 is transferred into 52,000. We can
- 6:18:11now combine these two columns because if
- 6:18:13you will, they're the same value of the
- 6:18:16same magnitude. Now, so for this one, we
- 6:18:18want to have multiple column selections.
- 6:18:20So, holding control, I do salary year
- 6:18:22average and salary hour average. And I
- 6:18:24come up here to column from example and
- 6:18:26I select from selection. So, what I'm
- 6:18:29going to do is just enter in for this
- 6:18:30one, I want to enter in the 52,000.
- 6:18:33Pressing enter. It looks like it's
- 6:18:35saying, oh, hey, we want to copy these.
- 6:18:37Oh, but we don't want null for these
- 6:18:39values. So, instead, what I'll do is
- 6:18:40I'll click inside of here and I'll start
- 6:18:42entering 120,000. Press enter. See if it
- 6:18:46can figure it out. Oh, okay. It did
- 6:18:47figure it out. Looking at the M language
- 6:18:50for this, we can see that it says, "Hey,
- 6:18:52we're just going to combine the text,
- 6:18:54the text from the salary, year average
- 6:18:56column and the text from the salary hour
- 6:18:58average column." Notice though that it
- 6:19:01is using a text function, which we're
- 6:19:03going to have to deal with. Anyway, I'm
- 6:19:04going to go ahead and first change the
- 6:19:07name of this to salary year and hour.
- 6:19:10Press enter and then press okay. Now,
- 6:19:12like I said, look at these different
- 6:19:14values. These are italics and to the
- 6:19:16right. So I know these are actual number
- 6:19:17values. However, this is to the left
- 6:19:19hand side because it converted it to a
- 6:19:21text and I can confirm this underneath
- 6:19:23the home tab because it says that it's
- 6:19:26text. In our case, we want it to be
- 6:19:28standard. So we're just going to
- 6:19:30transfer it to a decimal number. So what
- 6:19:32I'm going to do is going to close and
- 6:19:33apply this in a new page called salary
- 6:19:36stats. Let's inspect this new column
- 6:19:38that we created. I'm going to draw draw
- 6:19:40in a stack bar chart for this. And from
- 6:19:42that job postings fact table for this
- 6:19:45we're going to drag in job title short
- 6:19:47into the y-axis and then our newly
- 6:19:50created column. Let me expand this over
- 6:19:53salary year and hour aggregating this by
- 6:19:57median. Now we can also see in the tool
- 6:19:59tips what is the count of all these. So
- 6:20:01I'm going to drag this into here and
- 6:20:03select this to count. So with this
- 6:20:06making this into focus mode, we can now
- 6:20:08see we're having even more values based
- 6:20:11on this count and we have more inputs
- 6:20:14into what these different salaries are.
- 6:20:16Not just based on only the yearly
- 6:20:18salary, but also the hourly salary. Now,
- 6:20:20one more example to use for this column
- 6:20:22from example. We're going to go back
- 6:20:23into transform data. And I did forget a
- 6:20:26step if you can't remember. It didn't
- 6:20:27affect that last visualization, but
- 6:20:29remember we did do this filtered rows to
- 6:20:32remove those values that didn't have or
- 6:20:36had null values for the salary. We we do
- 6:20:38want to remove that step. So, I'm going
- 6:20:40to go ahead and delete that. All right.
- 6:20:41And then go move to the last step. All
- 6:20:43right. There's last one last thing I
- 6:20:45want to do and it deals with the salary
- 6:20:47hour average column. Once again, uh no
- 6:20:49uh but I'm only going to filter this
- 6:20:51again, but I only want to filter it for
- 6:20:52hours. So, we can actually see all the
- 6:20:54things in here. Once again, this is
- 6:20:56something we'll need to remove with this
- 6:20:58salary hour average column. I want to be
- 6:21:01able to bucket data. What do I mean by
- 6:21:04that? Well, let's select salary hour
- 6:21:07average. Go into add column and do
- 6:21:09column from example. I want to put these
- 6:21:12salaries into $10 increments. So
- 6:21:16something like 25. I want it to be 2230.
- 6:21:21I'm going to press enter. And we can see
- 6:21:23that it filled it in. So in this case,
- 6:21:27just going down to make sure we have it.
- 6:21:28So this case 68.24, it does a bucket of
- 6:21:3160 to 70. Pretty cool. And looking at
- 6:21:35the M language for this, it actually
- 6:21:37goes off screen. It does some sort of
- 6:21:40offset and then basically increments by
- 6:21:42tens based on the value. Overall,
- 6:21:44inspecting these different values, it is
- 6:21:46working correctly. So I'm okay with it.
- 6:21:48I am going to change this name of this
- 6:21:50from range to salary hour bucket and
- 6:21:54then I'm going to click okay. All right.
- 6:21:56So now we have this new one. Once again
- 6:21:59remember we did filter for just the
- 6:22:02hourly data only. I don't want to keep
- 6:22:05that or this step of filtering. So I'm
- 6:22:07going to remove it. All the other steps
- 6:22:09will update for this. And then I can go
- 6:22:11to home and close it and load it in. And
- 6:22:14now with this one, I can come in here,
- 6:22:16insert in a stacked column chart, drag
- 6:22:18salary bucket into the x-axis, and then
- 6:22:22we want to count that as well. So I'll
- 6:22:24drag it into the count of here. And
- 6:22:26entering into focus mode, we can see
- 6:22:28that some of the most popular salaries
- 6:22:31are between 20 to 30, 67, 40, 50, 50,
- 6:22:34and whatnot. So some pretty interesting
- 6:22:36insights out of bucketing this together.
- 6:22:39And it basically creates what is known
- 6:22:41as like a histogram. Now, you may be
- 6:22:43like, Luke, looking at this, this is out
- 6:22:45of order because 0 to 10 is all the way
- 6:22:47back here. I mean, yeah, it is out of
- 6:22:49order. The easiest way to fix this,
- 6:22:51unfortunately, is using DAX, which
- 6:22:53conveniently is coming up in the next
- 6:22:55chapter. And so, we will talk about how
- 6:22:56to tackle this problem of sorting it
- 6:22:58using that X-axis in this case.
- 6:23:04Now, let's crank up a notch and let's
- 6:23:05jump into custom columns. With this,
- 6:23:08we're going to be actually creating or
- 6:23:11writing M language, if you will, in
- 6:23:13order to build these custom columns. For
- 6:23:15this, I wanted to since it's more
- 6:23:17advanced, I want to keep it familiar
- 6:23:19with what you've done already. So, we're
- 6:23:21going to be recreating how we created
- 6:23:24this salary hour adjusted column and the
- 6:23:27salary year and hour column. So, let's
- 6:23:30start with the salary hour adjusted
- 6:23:32first because that one's frankly the
- 6:23:34easiest. We're going to go into add
- 6:23:35column and we're going to select custom
- 6:23:38column. In this case, a new pop-up
- 6:23:41window comes up called custom column.
- 6:23:42You can name the column. So remember,
- 6:23:45we're doing salary, hour, adjusted, and
- 6:23:48I'm going to name this V1. Then
- 6:23:50underneath here, we have our custom
- 6:23:52column formula. And we have all our
- 6:23:54available columns on the right hand
- 6:23:55side. So I can take something like
- 6:23:57salary, hour, average, and insert that
- 6:24:00in over here. In this case, if I were to
- 6:24:03click okay and load this in, it's going
- 6:24:06to then load in those values. As I can
- 6:24:09see, 25 here, 25 over here in that
- 6:24:11salary hour average column. So, that's
- 6:24:14just a simple way. But navigating back
- 6:24:17into it by clicking that settings icon,
- 6:24:19we can actually do manipulations with
- 6:24:21this. We're not going to do anything
- 6:24:22advanced. Remember before we did
- 6:24:24multiplication, we did 2080. Well, with
- 6:24:272080, right, is 52 weeks in a year times
- 6:24:3240 hours in a week. So, whenever I do
- 6:24:35this for salary hour adjusted V1, click
- 6:24:38okay. It now updates from that 25 to
- 6:24:4252,000, which we can see from this other
- 6:24:45column that we created already. That is
- 6:24:46correct. All right. Next task. We want
- 6:24:48to recreate this salary, year, and hour
- 6:24:52column. Once again, we're going to go
- 6:24:54and select custom column and call this
- 6:24:56salary year and our V1. Now, for this
- 6:25:00one, we need an if statement. Basically,
- 6:25:04we're going to write an if statement and
- 6:25:05then have things below it. I'll be
- 6:25:07honest, I don't have the M language
- 6:25:09memorized for that, and I don't think
- 6:25:10you need to necessarily, too. Instead,
- 6:25:13I'd recommend using your favorite
- 6:25:15chatbot, ChatGBT, or even Google Gemini.
- 6:25:18In it, I'm going to provide this prompt.
- 6:25:19Give me the custom column code for Power
- 6:25:21Query 2. Combine the salary year average
- 6:25:24column and salary hour adjusted column.
- 6:25:26There's either a value in either one or
- 6:25:28the other column. Go ahead and click
- 6:25:31enter. It gives me this bad boy, which
- 6:25:33looks pretty simple. I'm going to go
- 6:25:35ahead and copy this. So, I can just
- 6:25:37select copy. I'm going to go ahead and
- 6:25:39paste it. I press Ctrl +V. Notice there
- 6:25:41are two question marks or sorry, two
- 6:25:44equal signs. I'm going to remove this.
- 6:25:46Everything looks like it's okay. It says
- 6:25:48no syntax errors have been detected.
- 6:25:49I'll click okay. And scrolling here
- 6:25:51through here, we can see that it worked.
- 6:25:53We have 52,000 here for salary hour
- 6:25:55average. And then for this row that has
- 6:25:58salary year average in it, we have a
- 6:26:00value for it. So it's working out. Now,
- 6:26:02if you're not comfortable using the M
- 6:26:05language for this or using CHBT for it,
- 6:26:07no big deal. If we actually inspect this
- 6:26:10current step right here and go into it,
- 6:26:12custom code does not actually pop up. It
- 6:26:14actually directs us to this of adding a
- 6:26:17conditional column which we've gone
- 6:26:19through and demonstrated before and you
- 6:26:20could have built it similarly using this
- 6:26:22instead. I just wanted to demonstrate
- 6:26:24how to actually use them language.
- 6:26:29So now what happens if we want to create
- 6:26:31a completely new report but I don't want
- 6:26:35frankly I don't want all of these
- 6:26:36different queries in here and I don't
- 6:26:39want all these different pages in here.
- 6:26:41So, we just want to create a new report
- 6:26:44and specifically I want this job
- 6:26:46postings fact query as we demonstrate.
- 6:26:49We can go into advanced editor and we
- 6:26:51can get all this code right here. Well,
- 6:26:55that's what we're going to use for this.
- 6:26:56So, let's first start by creating a new
- 6:26:59report. So, I'm going to start a blank
- 6:27:01report. And in this, I'm going to just
- 6:27:03go into transform data. Transform data.
- 6:27:06And we're going to say this is from a
- 6:27:08new source. Specifically, this is going
- 6:27:11to be a blank query. We're going to
- 6:27:13rename this to what we want to move over
- 6:27:16of job postings fact. All right, so
- 6:27:18let's try this. Navigating back into our
- 6:27:21other file. I have the code here that I
- 6:27:23want. I'm going to go ahead and select
- 6:27:26it all and I'm going to press Ctrl C.
- 6:27:29Now, real quick before I paste it, just
- 6:27:31a reminder, right, these are all the
- 6:27:33different steps, right? We talked about
- 6:27:35earlier. I'm going to go to done. These
- 6:27:38are all the different steps that are in
- 6:27:39the applied step and they're all within
- 6:27:42this let statement right there. The last
- 6:27:45portion, this in is what's then output
- 6:27:49and it's always basically this last step
- 6:27:51right here. So nothing really special
- 6:27:53with the syntax further that we need to
- 6:27:55understand about it. Anyway, I did go
- 6:27:57through and actually copy it. Crl + C.
- 6:27:59Now in inside of our new report going
- 6:28:01into the advanced editor for this one,
- 6:28:04right? We still have that let there's
- 6:28:06nothing for the source and then that
- 6:28:07source is that last step. Anyway, I
- 6:28:09don't really care about that. I'm going
- 6:28:10to delete it all and I'm going to paste
- 6:28:12in all of the different code in here.
- 6:28:15Now it does say here no syntax errors
- 6:28:18have been detected. We are going to run
- 6:28:20into an issue. We'll get to it. But I'm
- 6:28:22going to go ahead and click done. Okay.
- 6:28:24So in here I am on the last step and it
- 6:28:27says there's an expression error. the
- 6:28:29import star schema file matches no
- 6:28:31exports. Did you miss a module
- 6:28:33reference? I'm going to say hey go to
- 6:28:35that error and it's going to immediately
- 6:28:37take me to that source step which
- 6:28:39basically says it is this and we're
- 6:28:41referencing remember we're referencing
- 6:28:43the source step is referencing the star
- 6:28:46schema files query the one that we
- 6:28:49created about three lessons ago but we
- 6:28:51have no query of star schema files so
- 6:28:53let's navigate back to our original file
- 6:28:56here I can see the star schema files is
- 6:28:58right here we can inspect it with
- 6:29:00advanced editor and for this one, we're
- 6:29:03going to take a little bit of a leap,
- 6:29:05but this is the source and it tells us
- 6:29:08the folder and the files that we need to
- 6:29:10connect to. It's just one step. I'm
- 6:29:13going to go ahead and just copy the
- 6:29:15steps only for this portion and
- 6:29:18navigating back to our new report. Going
- 6:29:21into the advanced editor, look at this.
- 6:29:23This source up here is referencing that
- 6:29:24star schema files. Instead, what I'm
- 6:29:26going to do, I'm going to leave make
- 6:29:28sure that that comma is not selected.
- 6:29:29I'm going to delete it to there. And I'm
- 6:29:31going to paste in source, which
- 6:29:34navigates to the files or folder of this
- 6:29:37here. And I'm going to click done. And
- 6:29:39voila, it loaded in. Now, let's actually
- 6:29:42change this back to what it was, cuz
- 6:29:44most likely you're not going to know to
- 6:29:46actually change this to this. What's
- 6:29:48going to happen is you're going to and
- 6:29:49you're going to run this. This is
- 6:29:50probably be the scenario that you're in.
- 6:29:51You're going to say, "Hey, go to error."
- 6:29:53And you're going to be like, "What the
- 6:29:54heck is going on here?" Well, this is
- 6:29:56what I recommend doing. or copy this
- 6:29:58error message inside your favorite
- 6:30:00chatbot. Paste this in. Go down and then
- 6:30:04from there, get the actual code itself
- 6:30:06so it knows what's going on. And then
- 6:30:09pasting that code in there. That's all
- 6:30:10I'm going to put in here. I'm going to
- 6:30:12see what it can say. And interesting
- 6:30:14enough, it says the fix for this is we
- 6:30:16need to replace this line with the
- 6:30:19correct folder files function.
- 6:30:21Specifically, this one right here. So,
- 6:30:23I'm going to go ahead and copy it, paste
- 6:30:24it into here, and then click done, and
- 6:30:28bam, it got it. So, make sure you're
- 6:30:30taking advantage of something like chatb
- 6:30:32and these chatbots anytime you need to
- 6:30:34get into some coding, you're not
- 6:30:35comfortable with it. Now, one note on
- 6:30:38error troubleshooting. Some of you may
- 6:30:40have executed that previous query and
- 6:30:43have gotten this error right here where
- 6:30:45it says the key didn't match rows in the
- 6:30:47table and it specifies well one I'm
- 6:30:49going to click go to error and I know
- 6:30:50it's that second step of navigation
- 6:30:52basically says the key isn't right
- 6:30:54specifically this folder path most
- 6:30:56likely this folder path is not correct
- 6:30:59and I know that from troubleshooting
- 6:31:01this and being experienced with power
- 6:31:02query but you may not. So, I'm just
- 6:31:04going to copy this and then paste it
- 6:31:05into chat GPT to see what it says. And
- 6:31:07it's saying, "Hey, you're getting this
- 6:31:09error because either the folder path is
- 6:31:11incorrect or the file name is
- 6:31:13incorrect." So, it's hitting you towards
- 6:31:15it. Now, some others of you may be
- 6:31:18getting this error message. Once again,
- 6:31:20I'll go to error. And this one's with
- 6:31:22the second step as well, but this one's
- 6:31:24different. It says, "Hey, data source
- 6:31:26not found." It's actually queuing in
- 6:31:27more to what's wrong with this. And it
- 6:31:29has this location here. Anyway, the
- 6:31:31problem is you probably don't have the
- 6:31:34correct file path of where job postings
- 6:31:37fact.csv is. So all you have to do is
- 6:31:40navigate to where it is in file
- 6:31:41explorer. Here I'm in the project folder
- 6:31:42and navigate into data and then the star
- 6:31:44schema folder. Up here I can just
- 6:31:47rightclick and say hey I want to copy
- 6:31:49this address. Then inside of chat GBT I
- 6:31:52can say I found the issue. It was a file
- 6:31:55path issue. The file is here. update my
- 6:31:59code and it update all the different
- 6:32:02code. It has it all here. All I'm going
- 6:32:03to do is just copy it, remove all this
- 6:32:06old code in here, paste it in, cross my
- 6:32:09fingers, press done, and bam, it works.
- 6:32:14So, the moral of the story is don't
- 6:32:16undervalue using chat GBT and helping
- 6:32:18you troubleshoot things like this. All
- 6:32:21right, so that wraps up Power Query. You
- 6:32:23now have some practice problems to go
- 6:32:24through to get more familiar with custom
- 6:32:27columns and also column from example. In
- 6:32:30the next lesson, which is going to be
- 6:32:32the next chapter, we're going to be
- 6:32:33jumping into DAX. I'm super excited
- 6:32:35about that. I'll see you there.
- 6:32:40Welcome to this fourth and final chapter
- 6:32:43in this PowerBI course, and we're going
- 6:32:45to be covering DAX or data analysis
- 6:32:48expressions. Now, we just got done with
- 6:32:50the M language. So, it's very important
- 6:32:53that we distinguish between the two. The
- 6:32:54M language, which is a more of a
- 6:32:56programming language, is used in Power
- 6:32:59Query in the process of actually loading
- 6:33:01and transforming the data to get it into
- 6:33:04PowerBI. Whereas, DAX data analysis
- 6:33:07expressions is a formula language and
- 6:33:10it's used in the front end in PowerBI
- 6:33:14after the data is already loaded in. And
- 6:33:16in this video, we're going to have an
- 6:33:18intro diving deeper into what exactly
- 6:33:21DAX is, but also how we can use it in
- 6:33:24different use cases, specifically with
- 6:33:26calculated columns, calculated tables,
- 6:33:28and even explicit measures. And then for
- 6:33:31the remaining two lessons, we're going
- 6:33:33to dive deeper into measures, and then
- 6:33:35also into parameters. But we're getting
- 6:33:38ahead of oursel, let's actually look
- 6:33:39into what exactly is DAX.
- 6:33:44So what exactly is this formula
- 6:33:46language? Well, it's a method of
- 6:33:48actually adding calculations to our data
- 6:33:51model that we've loaded into PowerBI.
- 6:33:53We're going to be focusing only on this
- 6:33:55tool, but you can actually use DAX and
- 6:33:57other tools as well like Microsoft
- 6:33:59Excel, Microsoft Fabric, SQL Service
- 6:34:02Analysis, and also Azure Analysis
- 6:34:05Services. It's basically great at
- 6:34:07performing calculations on large sets of
- 6:34:10data. It's super powerful. Now, anytime
- 6:34:13you're using some sort of formula
- 6:34:14language, I'm going to recommend that
- 6:34:17you go directly to the data source
- 6:34:18anytime you have questions. So, I'll put
- 6:34:20a link up on the screen and feel free to
- 6:34:22keep this in a separate window to look
- 6:34:24up any different functions from DAX you
- 6:34:26want to learn more about. Anyway, it has
- 6:34:28a host of different features. You could
- 6:34:30use it for aggregation functions such as
- 6:34:32average, count, max, min, and sum. It
- 6:34:36has date and time functions. Some of
- 6:34:38which we'll demonstrate in this and
- 6:34:39actually building a calendar, but more
- 6:34:41ones that you may be familiar with are
- 6:34:43things like extracting day, minute,
- 6:34:44month. Then they even have things like
- 6:34:46logical functions that you can do if
- 6:34:48statements and or or. And then finally,
- 6:34:51other common one that I find myself
- 6:34:52using is math and trig functions. Now,
- 6:34:54if you have familiarity with Excel
- 6:34:57functions, DAX functions are very
- 6:34:59similar, especially in their syntax they
- 6:35:02use. The one main thing to get around
- 6:35:04between Excel and DAX is that Excel
- 6:35:08operates in a single cell. Whereas with
- 6:35:11DAX, we can run a calculation that can
- 6:35:14be run not only on a single row within a
- 6:35:17cell, but also entire columns or even
- 6:35:20tables. I put together this table that
- 6:35:23goes through and compares all the
- 6:35:26different functions. You can access it
- 6:35:27inside of my course notes. Anyway, the
- 6:35:30point of it is not to actually have you
- 6:35:32memorize all these different things.
- 6:35:34Instead, if we were to take a look up
- 6:35:35here at the top, we can see that for
- 6:35:37Excel, the sum function that you use
- 6:35:40here, it's very similar in DAX on sum.
- 6:35:42Just instead of an Excel like you'd
- 6:35:44insert in a cell or a range, here in
- 6:35:46DAX, you're going to be inserting in
- 6:35:48probably a column name instead. Now I am
- 6:35:50making the assumption with building this
- 6:35:52DAX portion that you have some
- 6:35:54familiarity with writing formulas in
- 6:35:57Excel such as the ones listed here.
- 6:36:00Nothing too complex but at least
- 6:36:02understanding the concept of writing
- 6:36:04formulas. We're not going to necessarily
- 6:36:06go into the basics of writing formulas.
- 6:36:08So unfortunately I'm assuming that you
- 6:36:10have that kind of knowledge. Now I do
- 6:36:12want to briefly call out that there is a
- 6:36:14difference between DAX and M language.
- 6:36:18Like I spoke previously, DAX is a
- 6:36:20formula language such as sum, average,
- 6:36:22and whatnot. Where the M language is
- 6:36:25more of a programming language. It's
- 6:36:27much more verbose. What you apply on the
- 6:36:29other is not interchangeable with the
- 6:36:31other like Excel functions were. Once
- 6:36:34again, I put together a table compare
- 6:36:36comparing DAX to the M language on
- 6:36:39certain things. And we can see that it's
- 6:36:41very much a different type of language
- 6:36:44used for M language. even something like
- 6:36:46concatenate. Instead, we're going to be
- 6:36:48using text combined. So, it's not even
- 6:36:49the same word. It's a different
- 6:36:51structure. Once again, you don't need to
- 6:36:52memorize this list. This is just more
- 6:36:54meant for demonstration purposes. Now,
- 6:36:56in this chapter, we're going to be
- 6:36:57focusing on four methods of applying or
- 6:37:01using DAX inside of PowerBI. And that's
- 6:37:04with measures, specifically explicit
- 6:37:06measures, calculated columns, calculated
- 6:37:08tables, and also parameters. Parameters,
- 6:37:11we're not going to get into an example
- 6:37:12of that until the third lesson. Now,
- 6:37:15what we're going to be covering during
- 6:37:16this chapter is not exclusive of all the
- 6:37:19different DAX locations. You can
- 6:37:21actually use it in some other concepts
- 6:37:22as well, such as rowle security, dynamic
- 6:37:25format strings, and whatnot. Anyway, all
- 6:37:27these concepts listed here are beyond
- 6:37:29the scope of this course. They're more
- 6:37:31advanced concepts, but once you
- 6:37:33understand the basics of DAX, you'll be
- 6:37:35able to go in and apply it into these if
- 6:37:37you decide to learn any of these topics.
- 6:37:42So, let's get into our first example
- 6:37:43with calculated columns. And for this
- 6:37:46and all the examples in this, we're
- 6:37:47going to be continue working from that
- 6:37:49same file you were working in in the
- 6:37:51last lesson on the with the M language.
- 6:37:53But if you didn't happen to keep it, you
- 6:37:55can just navigate into the project file
- 6:37:56and just open up that 3.6 M language
- 6:37:59PowerBI file. Inside of here, you should
- 6:38:01have that data model with our job
- 6:38:03postings fact table and then our
- 6:38:05different dimensional tables as shown
- 6:38:06here. Now, inside of PowerBI, we can
- 6:38:09access our use DAX specifically from
- 6:38:12this modeling tab. We're going to be
- 6:38:14using all these different features of
- 6:38:16new measures, new columns, and new
- 6:38:18table. In this lesson, we'll be using
- 6:38:20new parameter in the third lesson of
- 6:38:23this. And like I said, rowle security is
- 6:38:25beyond the scope of this course. We're
- 6:38:27not going to be covering it for this,
- 6:38:28but this is where you'd enter it in. So,
- 6:38:29here's what I'm thinking for the
- 6:38:30calculated column. We're going to be
- 6:38:31doing something similar to what we did
- 6:38:33in Power Query. Mainly just to
- 6:38:35demonstrate how you can do both in each
- 6:38:37inside of our job postings fact table.
- 6:38:40Previously in the last chapter, we use
- 6:38:43Power Query to create the salary salary
- 6:38:45hour adjusted and also salary hour
- 6:38:47adjusted V1 column. Both of them just
- 6:38:49use different methods. Anyway, in this
- 6:38:50one, we're going to recreate this column
- 6:38:52once again, but now using DAX. And then
- 6:38:55we'll take it obviously a step further
- 6:38:56and also build the salary year and hour
- 6:38:59column. But this one's going to be
- 6:39:00slightly more complex. Anyway, let's
- 6:39:02create a new column in this data set. As
- 6:39:04I mentioned, from the report view, you
- 6:39:05can get it to it from modeling and
- 6:39:07select new column. The one thing though
- 6:39:09is you have to make sure that the
- 6:39:11correct table is selected, right? We
- 6:39:13wanted to do job postings fact table.
- 6:39:15It's inserting it into company dim. Not
- 6:39:17what I want. I'm just going to press
- 6:39:19escape. It's going to undo it. So, if
- 6:39:21you did it from here, make sure you
- 6:39:22select job postings fact and then select
- 6:39:24new column to be inserted in here. The
- 6:39:27other method where you can get to it is
- 6:39:29in table view with the appropriate table
- 6:39:32selected. You can see that it appears up
- 6:39:34at the top as well or you can just
- 6:39:37rightclick it and inside the table
- 6:39:39itself select new column. And I like
- 6:39:41doing it here from here because it's
- 6:39:43showing me visibly what's happening in
- 6:39:45here. So this is my recommended way of
- 6:39:47doing it. Anyway, we want to make this
- 6:39:49salary hour adjusted column. And we can
- 6:39:52see that we start by writing first the
- 6:39:55column name before the equal sign. And
- 6:39:58we call the salary hour adjusted V2.
- 6:40:01Now, as a reminder, we're going to be
- 6:40:03taking that salary hour average column
- 6:40:06and multiplying it times 52 weeks in a
- 6:40:08year and 40 hours per week. So, what I
- 6:40:11can start doing is just typing in this
- 6:40:14column name. And you're noticing that we
- 6:40:17have this syntax here. It has the table
- 6:40:20name and then the column name. We want
- 6:40:23this one right here of job postings fact
- 6:40:26salary hour average. It's highlighted
- 6:40:29blue so I know it's working correctly.
- 6:40:31We're just going to do that for the time
- 6:40:32being. Press enter. Make sure that it
- 6:40:35loads in. Okay, we have those values in.
- 6:40:38Now all we want to do is do some simple
- 6:40:40multiplication. So I'll do a time symbol
- 6:40:43of 52 weeks in a year and then 40 hours
- 6:40:47in a week. Press enter and we get that
- 6:40:50520,000. I'm going to go ahead and just
- 6:40:53format it as currency. One thing to note
- 6:40:55over here in the data pane, we can see
- 6:40:57scrolling on down salary hour adjusted
- 6:41:00V2 has this special symbol in front of
- 6:41:03it symbolizing that it is a calculated
- 6:41:06column. So it cues you into that. Now
- 6:41:08let's create this salary year and hour
- 6:41:11V1. I'm going to go ahead and select new
- 6:41:13column. Give it the name salary year and
- 6:41:15hour V2. And now remember this one is
- 6:41:18taking whether they have a value in that
- 6:41:21salary year average column right here.
- 6:41:24It's going to take either this value or
- 6:41:27if this is null it's going to end up
- 6:41:29taking our salary hour adjusted. So this
- 6:41:33value right here. Now I'll be honest
- 6:41:35this is more of an advanced technique in
- 6:41:37order to combine these two columns. So I
- 6:41:40wouldn't expect you to know this off the
- 6:41:41top of your head. Instead, I'd recommend
- 6:41:43you use something like chatgbt and I
- 6:41:46provide a prompt like this. I'm using
- 6:41:48DAX for calculated columns. I want the
- 6:41:50value in it to be either the the salary
- 6:41:53or average or the salary hour adjusted
- 6:41:55V2. Make sure you give the full table
- 6:41:57and column name to help it out. And it
- 6:41:59says assume the other well column is
- 6:42:02null. Go ahead and click enter. It gives
- 6:42:04me this formula which is an if formula.
- 6:42:07I'm going to go ahead and copy this.
- 6:42:09Notice it has the column name of
- 6:42:11preferred salary. I don't want to copy
- 6:42:13that. That's why I didn't copy that.
- 6:42:14Anyway, inside of here, I'm going to go
- 6:42:15ahead and paste that in. And apparently
- 6:42:18I did copy that, so I lied to you. But
- 6:42:21notice that all of the different there's
- 6:42:23no errors or anything like that. I'm
- 6:42:24going to go ahead and press enter. See
- 6:42:26if it works. And bam, it does. Now, if
- 6:42:29you've taken like my Excel course, this
- 6:42:31is probably looking very familiar to
- 6:42:33what you've done in my Excel course for
- 6:42:35making if statements. Once again, we're
- 6:42:37not going to be going into a lot of this
- 6:42:39because I just want to stick to the
- 6:42:40basics and show you how you can use
- 6:42:42something like Chad GBT to help out.
- 6:42:46Now, I want to pause real quick and
- 6:42:48evaluate because we just showed how to
- 6:42:50create a calculated column and
- 6:42:53previously we were using custom columns
- 6:42:55inside of Power Queries. So, you may be
- 6:42:58like, Luke, which one should I use? You
- 6:43:00just ran through that calculated columns
- 6:43:01one and did some advanced calculations
- 6:43:03and I have no idea how to do that. Well,
- 6:43:05the good news is in most cases I'm going
- 6:43:07to recommend don't use calculated
- 6:43:08columns. Instead, use your vast
- 6:43:10knowledge you already have on custom
- 6:43:12columns. Specifically, Power Query is
- 6:43:15much better at data transformations and
- 6:43:17preparations, and it does this before
- 6:43:19the data is even loaded into the model.
- 6:43:21So, you don't have to do it in the front
- 6:43:23end after all this is done. Also, I like
- 6:43:26to keep all of my data cleaning in one
- 6:43:29spot, specifically in Power Query. And
- 6:43:32if I start doing in the front end adding
- 6:43:34these calculators and columns, it gets
- 6:43:36sort of out of control of understanding
- 6:43:38what was my process to get the data
- 6:43:40clean and makes it harder to replicate
- 6:43:42later. The other thing to note is around
- 6:43:44compression and file sizes. Whenever you
- 6:43:47do this in Power Query, this data is
- 6:43:50compressed more efficiently and your
- 6:43:52file size is going to be much smaller
- 6:43:54and therefore your data models are going
- 6:43:56to load and operate much more quickly.
- 6:43:59So, long story short, I just showed you
- 6:44:01calculated columns, so you understood
- 6:44:03you could do them, but I'm going to
- 6:44:04recommend don't do them.
- 6:44:08Moving on to the second or third item
- 6:44:10we're going to cover this, and that's
- 6:44:11calculated tables. It's found under the
- 6:44:13button of new table. These type of
- 6:44:16tables are great for creating things
- 6:44:18like lookup tables, date tables, which
- 6:44:20we're going to demonstrate, and also
- 6:44:23transforming existing tables. Like I
- 6:44:26mentioned before, DAX very much not like
- 6:44:29Excel where it operates only a cell. DAX
- 6:44:31can operate on column names or a
- 6:44:33complete table. Now, I will give this
- 6:44:36caveat to start with because you've
- 6:44:38already seen calculated columns. Just
- 6:44:40like calculated columns and custom
- 6:44:41columns, it's much more beneficial to do
- 6:44:44data cleaning and also creating tables
- 6:44:47in Power Query instead. But I'd be
- 6:44:50remiss if I didn't show you how to
- 6:44:52actually do this with DAX in here
- 6:44:54because I think it's a good learning
- 6:44:55opportunity. So let's insert a new
- 6:44:57table. We can do that by going to the
- 6:44:59table tools here and inserting new
- 6:45:01table. Also underneath the report view,
- 6:45:03we can go into modeling and select new
- 6:45:05table here as well. I like that data
- 6:45:07view because I can keep track of what
- 6:45:09I'm doing. So I typically like to do it
- 6:45:11from here and select new table. And it's
- 6:45:13going to show me what I have below here.
- 6:45:15Anyway, let's say for this we want to
- 6:45:18get a table from the job postings fact
- 6:45:21table. Specifically, we want to get a
- 6:45:22list of all the different job title
- 6:45:25shorts in here. Remember, we have 10
- 6:45:26unique values. This would be more of a
- 6:45:28lookup table example that we're going to
- 6:45:30do. So, I can go to table tools, insert
- 6:45:32in that new table. For this, we'll call
- 6:45:34it job title dim. And then for this,
- 6:45:37we're going to use a function called
- 6:45:39distinct. distinct returns a one column
- 6:45:43table that contains the distinct values
- 6:45:46in a column. So now all we need to do is
- 6:45:49specify that column and it's this one
- 6:45:51here inside the job postings fact table.
- 6:45:54I need to make sure that I close off the
- 6:45:56parentheses and then press enter and
- 6:45:59then bam it generates below. Also I can
- 6:46:02see this table inside of here over here
- 6:46:04on job title dim. If you notice, this
- 6:46:07has a little calculator in front of the
- 6:46:08table icon to show that it's a
- 6:46:10calculated table and it shows the one
- 6:46:12icon. Now, let's create a date table, a
- 6:46:15date dimensional table. For this, we're
- 6:46:18going to call this date dim. And we're
- 6:46:20going to use the calendar function. And
- 6:46:23in this, it returns a table with one
- 6:46:24column of all dates between the start
- 6:46:26date and end date. I can see the syntax
- 6:46:28up here. It's prompting me to put in the
- 6:46:30start date first and then the end date.
- 6:46:32Now, these dates do have to be in a
- 6:46:34certain format. So, I'm going to use the
- 6:46:35date function specifying 2024 January
- 6:46:401st for this. Then putting a comma, we
- 6:46:43can now see we're in the end date. We're
- 6:46:44going to do date as well. And we want to
- 6:46:47go to the 31st of December for that
- 6:46:50year. And then we need to put a closing
- 6:46:52parenthesis on all that. Okay, I'm going
- 6:46:54to go ahead and press enter. All right,
- 6:46:57so pretty neat. This goes through and
- 6:46:59creates a date automatically to the end.
- 6:47:02And I'm realizing now that I have a
- 6:47:05typo. I put in 32. I didn't even know
- 6:47:07that was possible. Uh, going ahead and
- 6:47:09run enter. It did go ahead and clean
- 6:47:11that up. That's why it's always good
- 6:47:12that you inspect your data. Now, because
- 6:47:15this is going to be we're actually we're
- 6:47:16going to keep this date dim for the
- 6:47:18remainder of the course. And this is
- 6:47:20going to be our reference date table
- 6:47:22that we can use. We want to go ahead and
- 6:47:24mark this as a date table up here under
- 6:47:27tables tools. This will enable the
- 6:47:29creation of date related visuals, tables
- 6:47:31and quick measures using the tables date
- 6:47:34data. So this is really powerful to make
- 6:47:36some automatic features actually happen
- 6:47:37in the back end. For this we need to
- 6:47:40choose the correct column and there's
- 6:47:42only one column in here. It's date. It's
- 6:47:43validated successfully. We'll go ahead
- 6:47:46and click save. With this I'm going to
- 6:47:47now ma uh navigate over to the model
- 6:47:49view and we can see over here we have
- 6:47:51our job title dim table and our date
- 6:47:54dim. We're not going to use our job
- 6:47:56title dim anymore. So, I'm not going to
- 6:47:58connect it in, but I will drag date dim
- 6:48:01over here. And for this, I'll drag date
- 6:48:04onto job posted date. So, we can create
- 6:48:07this relationship. And it's picking up
- 6:48:10that. Okay. The date, job posted date.
- 6:48:12It's a one to many relationship, right?
- 6:48:14There's only one unique value in the
- 6:48:16date table. And there's going to be
- 6:48:17multiple in the job postings fact.
- 6:48:19Crossfit direction we'll leave as single
- 6:48:21right now. Click save. And this
- 6:48:24relationship is established. Now, let's
- 6:48:26get into modifying this date table even
- 6:48:29further. I lied to you a little bit in
- 6:48:31the fact that we typed this out and I
- 6:48:33did that so that way you understand
- 6:48:35understood that that could be a way of
- 6:48:37doing it. But if I type out calendar,
- 6:48:39there's actually this other one called
- 6:48:41calendar auto. And inside of here, I
- 6:48:44notic in the the parameter is actually a
- 6:48:47optional because it's in brackets. So,
- 6:48:50you don't have to actually insert
- 6:48:51anything into here. and from it array it
- 6:48:53returns a table with one column of dates
- 6:48:55calculated from the model automatically
- 6:48:57and we're connected into the model. So
- 6:48:59now when I run it it did I did run it
- 6:49:02there's no no difference because it
- 6:49:04automatically picks up those dates from
- 6:49:07January 1st all the way to December 31st
- 6:49:10and I don't have to specify it. Also if
- 6:49:11we add more dates in this would be more
- 6:49:14preferential because then we don't have
- 6:49:15to go in and try to update the dates and
- 6:49:18just using the calendar only function.
- 6:49:20Now, I do want to crank this up in a
- 6:49:23little bit more. Specifically, I want
- 6:49:25more columns than just this. I don't
- 6:49:27want just date. Maybe I want things like
- 6:49:30year or day of week. So, what I'm going
- 6:49:32to do is press shift enter to move this
- 6:49:35on down. And I'm actually going to move
- 6:49:37it down twice. And we're going to use
- 6:49:39the function of add columns. And it
- 6:49:42returns a table with new columns
- 6:49:45specified by the DAX expression. The
- 6:49:47first expression that we need to put in
- 6:49:49is a table and calendar auto is that
- 6:49:54table. After calendar auto, we need to
- 6:49:57insert in a name. It says name one,
- 6:50:00expression one. Name one is the column
- 6:50:03name. Expression one is the column we
- 6:50:06want to create. Now I'm going press
- 6:50:08shift and enter on down to the next line
- 6:50:10to actually do this. We're going to keep
- 6:50:11it simple. We want a column called year.
- 6:50:15So, what function do you think we're
- 6:50:16going to use to get the year? Well, we
- 6:50:19use year. And inside of here, we need to
- 6:50:22specify a date. And so, we need to
- 6:50:24insert in the column. If I just do a
- 6:50:27square brackets open up, I can see that
- 6:50:29date pops up. It's already picking up
- 6:50:31date because that's the column. Date is
- 6:50:33this column right here. All right. And
- 6:50:35then I'm going to close the parenthesis
- 6:50:37on this, right? Because we did the
- 6:50:39table, we did name one, and we did
- 6:50:42expression one. Going ahead and press
- 6:50:43enter. Now we have year. Now we can
- 6:50:46actually add in even additional things
- 6:50:48inside of here. I can press comma. I'm
- 6:50:51going to just shift down, enter down.
- 6:50:52I'm doing this all the shift enter stuff
- 6:50:54just to reformat it. It really doesn't
- 6:50:56matter. This is just so visually we can
- 6:50:58see the how things are aligned easier
- 6:51:01for me to read it. Anyway, now I'm
- 6:51:04seeing we have name two and expression
- 6:51:06two. If I wanted to, I could put in
- 6:51:08something like month number. And as you
- 6:51:11guessed, I'd probably use a function
- 6:51:12called month for this. It takes the
- 6:51:15argument of date. So I'll do that square
- 6:51:17bracket, insert in date, and then that
- 6:51:20is our second expression. So I'll shift
- 6:51:22on down and put a closing parenthesis on
- 6:51:25here. Press enter. Bam. We got month
- 6:51:27number. Since we have month number, you
- 6:51:29know, we're going to need month name. So
- 6:51:31let's add this in. I'm going to insert
- 6:51:33in a comma and shift enter down. Write
- 6:51:35the month name for this. And for this,
- 6:51:38there's not a month function for this.
- 6:51:42For this one, going to the source
- 6:51:44documentation, we can use the format
- 6:51:46function. In it, it takes a value. So,
- 6:51:49in our case, we're going to take date
- 6:51:50and then how we want to format it or the
- 6:51:52format string. We can see that it works
- 6:51:55in calculated columns and calculated
- 6:51:57tables as we're doing. Now, if we scroll
- 6:51:58on down, we can get to this section on
- 6:52:00custom datetime formats. And scrolling
- 6:52:03through this as well, I can see that
- 6:52:06right here. If we do four lowercase M's
- 6:52:10or uppercase M's, it displays the month
- 6:52:12as a full month name. So inside of here,
- 6:52:15I'm going to do format because that's
- 6:52:17the function we want to use. For the
- 6:52:18value, we're going to insert in the
- 6:52:21date. And then for the format, inside of
- 6:52:24quotes, we're going to insert in those
- 6:52:27M's. This looks good to me. I'm going to
- 6:52:29go ahead and press enter. Bam. We got a
- 6:52:31month name now. So now that we know that
- 6:52:33tactic, if I wanted to do something like
- 6:52:35in the weekday name, I could do similar
- 6:52:37with the format and just do four
- 6:52:39lowercase D's running enter. I get the
- 6:52:42weekday name. Now I'm going to enter in
- 6:52:44a few more different columns that I want
- 6:52:46in there and then we're going to go
- 6:52:47through it briefly. First up is date
- 6:52:50key. And all this is doing is just
- 6:52:51getting it into a numerical way. If I
- 6:52:53want to manipulate or reference it
- 6:52:55later, I can. Pretty common to use a
- 6:52:57date key in a date dimension table. As
- 6:53:00we had previously, we're going to keep
- 6:53:01the year, also the month number, and the
- 6:53:03month name. We'll take it a step further
- 6:53:06by adding in the year month, which all
- 6:53:08it is in this case is a dash between the
- 6:53:11two. And then also adding in the quarter
- 6:53:13itself. If you notice these, I used all
- 6:53:16uppercase. You can use uppercase or
- 6:53:17lowercase when specifying inside of that
- 6:53:20format function. Now, jumping to the
- 6:53:23last one, we did have the weekday name.
- 6:53:24And because of that, I included these
- 6:53:26two extra functions of week number and
- 6:53:30weekday number. All they take is the fun
- 6:53:32function for this one, week number of
- 6:53:34actual week num specifying the date and
- 6:53:37then the number two. Same thing for
- 6:53:40weekday. It takes the date and then the
- 6:53:42number two. for both of these options
- 6:53:44where we're specifying two. In this
- 6:53:46case, I'm at the weak gnome
- 6:53:47documentation syntax is date and then in
- 6:53:51these brackets here, it's saying it's an
- 6:53:53optional parameter, the return type. And
- 6:53:56if we go scroll down to this table, we
- 6:53:58can see that by default, it's one and
- 6:54:00that means the week begins on Sunday.
- 6:54:02I'm fancymancy and I changed two so that
- 6:54:05way the week begins on a Monday cuz
- 6:54:08that's when the work week begins. So, I
- 6:54:10could easily take this two out if I
- 6:54:12wanted to, as I mentioned, and run this
- 6:54:15again. And this doesn't really change
- 6:54:17any of our different values. It's going
- 6:54:18to change it later on when we go to plot
- 6:54:20it. Anyway, this is our date dimensional
- 6:54:22table. Feel free to pause the screen and
- 6:54:25make sure that you get this down into
- 6:54:28your report so you have this available.
- 6:54:30Now, I love having this dateimensional
- 6:54:32table because not only now I can do
- 6:54:34something like this where I can take the
- 6:54:36line chart and drag our date into the
- 6:54:38x-axis and then job ID into the yaxis
- 6:54:42for the count. Okay, so we get that.
- 6:54:44We've seen that before, but we can now
- 6:54:46take it a step for f further with our
- 6:54:48date dimensional table. In this, I'm
- 6:54:50going to create a stacked column chart.
- 6:54:53And I can drag the weekday name into the
- 6:54:56X axis and drag the job ID into the
- 6:55:00Yaxis. And we can see out of this, we'll
- 6:55:03go into focus mode. Tuesday is by far
- 6:55:06the most postings that when they happen
- 6:55:08and they happen the least on the
- 6:55:10weekend. Now, you may be like, Luke,
- 6:55:12this is great and all, but these names,
- 6:55:15these weekday names are out of order.
- 6:55:18What the heck is going on here? I want
- 6:55:21them to be in order. Well, navigating
- 6:55:23back into that table view for our column
- 6:55:26or for our date table itself. What we
- 6:55:28can do is you can just select your
- 6:55:31column of choice. In this case, weekday
- 6:55:33name, we want it to we want to organize
- 6:55:36it. And inside this column tools tab
- 6:55:38that's going to pop up when we have this
- 6:55:40selected, they have this option all the
- 6:55:42way to the right of sort by column. and
- 6:55:46you sort one column by the contents of
- 6:55:48another. Luckily, we built this this
- 6:55:52weekday number which we can see that the
- 6:55:54one value is associated with Sunday, two
- 6:55:57with Monday and so on. Anyway, what we
- 6:55:59can do is select sort by column with
- 6:56:02weekday name selected. We can say sort
- 6:56:04by the week number. Now, you may get
- 6:56:07this popup right here that says sort by
- 6:56:10another column. We can't sort the
- 6:56:11weekday name column by week number. This
- 6:56:14I feel is a little bit of a glitch right
- 6:56:16now in PowerBI. I'm going to click
- 6:56:18close. And what you may need to do is
- 6:56:20just recclick it, go to sort by column,
- 6:56:23and just do it again. Select it's a
- 6:56:25weekday number. And then this popup
- 6:56:26doesn't happen anymore. I don't know.
- 6:56:28It's just a weird little glitch that's
- 6:56:29going on with PowerBI. Anyway, I go back
- 6:56:31to report view. I need to actually
- 6:56:33refresh this and go back here. I'm going
- 6:56:35to remove weekday name and drag weekday
- 6:56:38name back into the X-axis. All right.
- 6:56:41Bam. It has now updated to be in order
- 6:56:44from Sunday down to Saturday. Now, as I
- 6:56:47mentioned, I like my work week to start
- 6:56:50on Monday. So, actually, I'm going to go
- 6:56:52back into that table view, and we're
- 6:56:54going to change that week number for the
- 6:56:56weekday function to specify that we want
- 6:56:59it to begin on Monday. And I'll do the
- 6:57:02same thing for week number itself.
- 6:57:05Specifying this is two. Then running
- 6:57:08this all, pressing enter. I can see now
- 6:57:10that it's updated because Monday up here
- 6:57:12is now one. And navigating back to my
- 6:57:14visual, my visual now updates for that.
- 6:57:16Okay, this date dimensional table that
- 6:57:19we created is going to be continued to
- 6:57:21use for the remainder of the course. So
- 6:57:23very important that you have this down
- 6:57:25correct. If you need to pause the screen
- 6:57:27right now and get this updated formula
- 6:57:30for you to actually use.
- 6:57:34Now let's jump into the last use case of
- 6:57:36DAX and it's going to be the m the
- 6:57:38primary focus for the next lesson and
- 6:57:41that's on measures. As you recall from
- 6:57:43previously anytime we were creating some
- 6:57:45sort of bar chart or count I would drag
- 6:57:48the job title short into that Y-axis and
- 6:57:50then anytime I want to do a count of the
- 6:57:51jobs to drag that into the X-axis and
- 6:57:55get the count of this. We also did this
- 6:57:57with job ID as well getting the count
- 6:58:00values are still the same. Anyway, every
- 6:58:01single time I had to go through and then
- 6:58:03update this title to job count, it's a
- 6:58:06mess. This is what we call an implicit
- 6:58:10measure. It's implied. And we're limited
- 6:58:14with these implicit measures to only the
- 6:58:17selections through this drop down arrow
- 6:58:20right here. But we can use explicit
- 6:58:23measures with DAX to make even more
- 6:58:26complex type of measures. But let's keep
- 6:58:28it simple for the time being. I'm going
- 6:58:29to go ahead and just copy this
- 6:58:31visualization and then paste it on over
- 6:58:33here. And we'll get rid of this job
- 6:58:35count. That's what we're going to be
- 6:58:36creating, a count of the jobs. Now, to
- 6:58:39create a measure, we can do it a number
- 6:58:41of different ways. I can rightclick the
- 6:58:43job postings fact table and then say,
- 6:58:46hey, I want to create a new measure. We
- 6:58:48can navigate to it under the modeling
- 6:58:50tab, getting to this new measure. Also,
- 6:58:53I can just select the table itself and
- 6:58:55table tools pops up. And then from there
- 6:58:58create new measure. So we first start by
- 6:59:00giving this measure a name. We're going
- 6:59:01to keep it simple of job count. And we
- 6:59:05want to do a count. So there's probably
- 6:59:06a formula called count. And in it we
- 6:59:09need to count the numbers in a column.
- 6:59:12So we can just specify the job ID. Put a
- 6:59:15closing parenthesis on this. Press
- 6:59:17enter. And now inside of our job
- 6:59:20postings fact table we have this
- 6:59:21measure. We can see this by this little
- 6:59:23calculator icon. And I can take job
- 6:59:24count which has that name written. And
- 6:59:26so the column name is also updated for
- 6:59:28job count. And we're getting that same
- 6:59:30value of 128994 as we got with the
- 6:59:33implicit measure. So their explicit
- 6:59:35measure a lot easier. So every time now
- 6:59:38we want job count. All we got to do is
- 6:59:39drag in that explicit measure. Now job
- 6:59:42count just because it's in the job
- 6:59:44postings f fact table doesn't mean it
- 6:59:46can only be used with the job postings
- 6:59:48fact table. Remember we do have
- 6:59:50relationships throughout the tables. So,
- 6:59:53we could technically use this for skills
- 6:59:56to figure out what are the counts of
- 6:59:57jobs for a certain skill. Back in our
- 7:00:00report view, I'm going to get rid of
- 7:00:01this table right here. We don't need
- 7:00:02this one anymore since we have an
- 7:00:04explicit measure. Now, I'm going to copy
- 7:00:06it and then paste it on over here. And
- 7:00:09instead of job title short in the yaxis,
- 7:00:12I'm going to navigate to that skills dim
- 7:00:14and I'm going to drag skills over to the
- 7:00:17Yaxis. Going into focus mode because we
- 7:00:20can see that the visualization built.
- 7:00:22Bam. We're now getting this job count
- 7:00:24based on the skill. Let's just create
- 7:00:27one more measure for funsies and that's
- 7:00:30going to be I'm going to rightclick this
- 7:00:31and select new measure for this.
- 7:00:33Remember we were doing the median yearly
- 7:00:34salary all the time with this. Well, we
- 7:00:36can create a measure for this. I'm going
- 7:00:39to create median yearly salary. Set it
- 7:00:41to equal. And then in this we're going
- 7:00:43to use the median function and we're
- 7:00:46going to specify that salary year
- 7:00:48average column. Going to close the
- 7:00:50parenthesis. Press enter. And then how
- 7:00:52we did that job count for job title
- 7:00:54short. Well, I can just trade out those
- 7:00:55values removing job count. And now we
- 7:00:58have the median yearly salary in here.
- 7:01:00Oh, and if remember right, we had to
- 7:01:04format this every single time with this.
- 7:01:06If I select median yearly salary uh from
- 7:01:09the data pane here and then this measure
- 7:01:12tools pops up. What I can do is I can
- 7:01:14not only change the name but also I can
- 7:01:17change what is the format. Specifically,
- 7:01:19I'm going to change it to currency and
- 7:01:21zero. And so now, every time I'm using
- 7:01:24this, so let's uh it's going to use that
- 7:01:27same value. Specifically, going to that
- 7:01:30skills, I'm going to get rid of that job
- 7:01:31count and drag median yearly salary into
- 7:01:34here. And whenever I scroll over it,
- 7:01:36it's actually formatted correctly. So,
- 7:01:39not only do I get the correct name, I
- 7:01:41don't have to update, but it keeps the
- 7:01:43data format that I'll want. I love
- 7:01:45explicit measures.
- 7:01:49Now, one last thing, I promise, and this
- 7:01:52has to do with measures versus
- 7:01:53calculated columns and tables. This is
- 7:01:55definitely a new concept, especially to
- 7:01:58those that haven't dealt with measures
- 7:01:59before. So, it's hard to wrap your head
- 7:02:02around what's the difference between a
- 7:02:04calculated column and what is a measure.
- 7:02:07It's important to understand that for
- 7:02:08calculated columns and also tables
- 7:02:11they're calculated immediately upon data
- 7:02:13import and they're visible in the data
- 7:02:16and also those report views. Now
- 7:02:18measures on the other hand are not done
- 7:02:21on the data import instead they're done
- 7:02:22at query runtime is is when that
- 7:02:25basically the visualization is getting
- 7:02:26built. So in this case there's a table
- 7:02:28that we're doing on job count. So these
- 7:02:29job titles it's getting calculated then
- 7:02:31and it's getting calculated down to that
- 7:02:34job title level. That's basically the
- 7:02:36filter for it. It's available in report
- 7:02:38views like we can do on a canvas, but
- 7:02:40it's also available in a DAX view as
- 7:02:42well. And DAX query view, we'll cover
- 7:02:45more in the next lesson. I feel like
- 7:02:46we've covered enough for the time being.
- 7:02:48Anyway, it's just an important concept
- 7:02:49to understand because many people when
- 7:02:51they go to the table view specifically
- 7:02:53for job postings, the fact table that we
- 7:02:55have here, I can see inside of here
- 7:02:58these calculated columns that we created
- 7:03:00of salary hour adjusted and salary year
- 7:03:02and hour as designated by these two
- 7:03:05icons in front of it. But if I try to
- 7:03:07look for things like the job count or
- 7:03:10the median yearly salary, that's not
- 7:03:13going to be anywhere on this table
- 7:03:14because that's not calculated to show in
- 7:03:17this view immediately on the data load.
- 7:03:20Instead, it's not calculated until let's
- 7:03:23say we put a M matrix in here and I draw
- 7:03:26job title short into the rows and then
- 7:03:29job count into the values. It's not
- 7:03:31calculated until this time. And it
- 7:03:34allows us to get this aggregation at
- 7:03:37this type of level which we're going to
- 7:03:39dive into more in the next lesson. All
- 7:03:42right, you have some practice problems
- 7:03:44now. Go through and get familiar with
- 7:03:46calculated columns, calculated tables,
- 7:03:48and also these explicit measures. In the
- 7:03:51next lesson, once you have that all
- 7:03:53down, we're going to be diving even
- 7:03:55deeper into explicit measures because
- 7:03:57they're the primary one that I'm using
- 7:03:58with DAX in here. With that, I'll see
- 7:04:00you there.
- 7:04:05Welcome to the second of three lessons
- 7:04:08on DAX. This one is going to be diving
- 7:04:11even deeper into explicit measures. With
- 7:04:14this, we're going to dive into building
- 7:04:16more complex measures, but also better
- 7:04:19understanding how to use them.
- 7:04:21Specifically, we're going to be able to
- 7:04:22do calculations that we haven't been
- 7:04:23able to do before, like calculating how
- 7:04:26many skills or an allen are associated
- 7:04:29with a particular job title. And because
- 7:04:32of this measure, we'll also be able to
- 7:04:34look into see do jobs that request more
- 7:04:37skills, do they actually pay more? So,
- 7:04:40some really unique insights that we
- 7:04:42wouldn't be able to do without DAX and
- 7:04:44specifically explicit measures. All
- 7:04:46right, let's jump into it.
- 7:04:50For this, you can either start with
- 7:04:52working with that report that you had
- 7:04:54from the last lesson, or if you didn't
- 7:04:56follow along and didn't keep up, feel
- 7:04:58free to just open up the one from the
- 7:05:00last lesson on 4.1 DAX intro. I did a
- 7:05:03few more calculations in here for the
- 7:05:05column check, the table check, and the
- 7:05:07measure check. Anyway, there's um
- 7:05:09unnecessary things that we created that
- 7:05:11we're not going to be using later on.
- 7:05:13So, I want to go ahead and clean this
- 7:05:15report up to make sure that it's as
- 7:05:18minimal as necessary so it doesn't cause
- 7:05:20issues later on when we're trying to
- 7:05:21build our project. Specifically, I'm
- 7:05:23going to delete these two columns. This
- 7:05:25one here on new column check and delete
- 7:05:28this one here on date table check. What
- 7:05:31I am keeping are the visualizations that
- 7:05:34we created in the last one. You may have
- 7:05:36to if you keeping if you're working on
- 7:05:38from the last lesson, you may have to
- 7:05:39recreate some of these. But basically we
- 7:05:41have on the left hand side what are the
- 7:05:44counts of different jobs and what are
- 7:05:46the salaries for different jobs and then
- 7:05:48conversely we have what are the counts
- 7:05:50of different skills along with what are
- 7:05:52the different pays for the top paying
- 7:05:54skills. So the report itself is looking
- 7:05:56good. Now let's move over to the data
- 7:05:58model itself. We did create this job
- 7:06:01title dim table which we can view here
- 7:06:03inside of our table view. We're not
- 7:06:05going to be using this any further. So,
- 7:06:07I'm going to go ahead and rightclick
- 7:06:08this and say delete from model. It'll
- 7:06:10prompt you if you want to do it. Yep.
- 7:06:12Next up, after the calculated table we
- 7:06:14created, I also want to get rid of these
- 7:06:16calculated columns that we created. So,
- 7:06:18I want to remove these two columns right
- 7:06:20here. Conveniently, I can see them with
- 7:06:22their icon that there were the
- 7:06:23calculated columns. All you have to do
- 7:06:25is just rightclick them and say delete
- 7:06:27from model and confirm it. I'll do it
- 7:06:30again for salary, hour, year. There's a
- 7:06:32error right now cuz I deleted them out
- 7:06:34of order. Anyway, both of them gone now.
- 7:06:36Now I also want to get rid of salary
- 7:06:38hour adjusted and salary year and hour.
- 7:06:41You can rightclick it and delete it this
- 7:06:43way. I want to control it though in
- 7:06:45Power Query because remember we did
- 7:06:47create these in Power Query. So for this
- 7:06:50I'm going to go into Power Query by
- 7:06:52going to transform data and then inside
- 7:06:54of here I'm going to remove these last
- 7:06:56two steps of adding the different
- 7:06:58columns into here. And we'll keep
- 7:07:00everything else in there. Looks good. Go
- 7:07:02ahead and close and apply it. All right.
- 7:07:04Not too bad. We've now cleaned up not
- 7:07:06only our report canvas, but also cleaned
- 7:07:08up our data model itself. That's in a
- 7:07:11good spot to continue on. This is good
- 7:07:12practice always to get rid of any
- 7:07:15measures, calculated columns, or whatnot
- 7:07:17that you're not using and that aren't
- 7:07:19useful because it's just going to cause
- 7:07:20confusion.
- 7:07:24On the same note of doing a model and
- 7:07:26report cleanup, we also need to make
- 7:07:27sure that we're implementing best
- 7:07:28practices for DAX and measures
- 7:07:30specifically in order to organize these
- 7:07:33measures that we're creating.
- 7:07:34Previously, we created these measures
- 7:07:37under this job posting fact. And I can
- 7:07:39see have job count here and median
- 7:07:41yearly salary down below it. It's best
- 7:07:44practice to create a table to just keep
- 7:07:47all of your measures in. And we can do
- 7:07:50this with calculated tables. going to
- 7:07:52modeling, inserting in a new table.
- 7:07:55Inside of here, I'm going to rename
- 7:07:57table, and I'm going to do underscore
- 7:07:59measures. This is for a few reasons.
- 7:08:02One, measures, the actual name is
- 7:08:04reserved. You can't use that. But two,
- 7:08:06since we have an underscore at the
- 7:08:07front, this allows it to be up at the
- 7:08:10top and so we can quickly access any
- 7:08:12measures that are inside of here. Now,
- 7:08:14we want to get our two measures that we
- 7:08:16created inside of here. You
- 7:08:18unfortunately you can't just drag and
- 7:08:19drop into here. But what I can do is I
- 7:08:21can select job count and measure tools
- 7:08:24tab comes up and it says the name of it
- 7:08:26but also what's the home table and we
- 7:08:29can change this to measures. We can also
- 7:08:31do this the same for median yearly
- 7:08:34salary. I'm going to change this one to
- 7:08:36measures as well. Now inside of here in
- 7:08:39our measures table we have our measures.
- 7:08:41Now you will notice it does have this
- 7:08:43column. If I click on this and then go
- 7:08:45into the table view, you have to have a
- 7:08:48column which is blank. You can't get rid
- 7:08:50of that. That just has to be there. And
- 7:08:52just a reminder from last lesson, it
- 7:08:54doesn't matter where these measures are
- 7:08:56as we moved them. The measures, as we
- 7:08:58can see here, um we're using this job
- 7:09:00count in the x-axis right here. The
- 7:09:02measures are still going to work the
- 7:09:04same. Now, besides keeping them
- 7:09:06organized in a certain location, the
- 7:09:07next thing that is widely done is
- 7:09:10commenting to make sure that you're
- 7:09:13documenting what this measure actually
- 7:09:15does. What do I mean by this? I'm going
- 7:09:17to expand this down to full full view so
- 7:09:19that way we can see it. I'm going to
- 7:09:21press shift enter so that way we can
- 7:09:23navigate down and we can insert in
- 7:09:26what's called a comment. How I do this
- 7:09:28is I can do two forward slashes as shown
- 7:09:32here. And everything after this on this
- 7:09:35line is not going to get interpreted.
- 7:09:37And I can put in something like this of
- 7:09:39that calculates the median yearly salary
- 7:09:41across all job postings. If I wanted to
- 7:09:44put another line down, I press shift
- 7:09:46enter, put in two forward slashes, and
- 7:09:48then I could put in something like this
- 7:09:50of uses median over average to account
- 7:09:52for high salary outliers. Also,
- 7:09:54typically what we're going to see is
- 7:09:55that the name of the measure is on the
- 7:09:57first line and then pressing shift enter
- 7:09:59after median. The function or the next
- 7:10:01function begins on the next line. And
- 7:10:04from time to time, you may see me, this
- 7:10:06one only has one variable, so this is
- 7:10:07actually fine. But from time to time,
- 7:10:09you may see me putting variables on
- 7:10:12their own separate line and then having
- 7:10:15it in this manner. Regardless, even if I
- 7:10:17press enter right here, close out of
- 7:10:19this formula bar, everything underneath
- 7:10:22this is working just fine. That is using
- 7:10:24this measure. So, I can verify this is
- 7:10:26using that median yearly salary measure.
- 7:10:29Now, let's clean up this job count as
- 7:10:31well. I'm going to bring this one on
- 7:10:33down here. And then we're going to
- 7:10:35insert in a multi-line comma. There's
- 7:10:38going to be multiple lines in here. And
- 7:10:39how we can do this is we do a forward
- 7:10:41slash asterisk. And then I'm going to
- 7:10:43shift enter, shift enter, shift enter.
- 7:10:45And then we can close off this comment
- 7:10:47by doing an asterisk and then forward
- 7:10:49slash. Now, anything we put inside of
- 7:10:52here is going to be commented off. And
- 7:10:55we can see that it's all commented by
- 7:10:56this new text that I just stuck in here
- 7:10:58as it's all green. The syntax
- 7:11:00highlighting is pretty helpful. And I
- 7:11:02just put that it calculates the total
- 7:11:03count of jobs and it's used as a
- 7:11:05denominator as we're going to show in
- 7:11:07various per job calculations. Now I want
- 7:11:10to switch this actually and we're going
- 7:11:13to be using now instead count rows and
- 7:11:16we're using count rows because every row
- 7:11:19in this table of job postings fact is a
- 7:11:22single job posting or the count of a
- 7:11:24job. So we're going to do that. Anyway,
- 7:11:27I just want to show before this. This is
- 7:11:28what's really neat about measures and
- 7:11:30what I really love about them. Right? So
- 7:11:32we have this used inside of here. These
- 7:11:34top two tables here that are using that
- 7:11:37job count. If for some reason I need to
- 7:11:39update a measure, all I have to do is
- 7:11:42just come in here, insert in the new
- 7:11:44formula that I want to use for this. I
- 7:11:46want to use count rows. In this case,
- 7:11:48for count rows, it counts the number of
- 7:11:49rows in a table. So I only need to list
- 7:11:52a table of job postings fact. Close the
- 7:11:56parenthesis. Press enter. And then
- 7:12:00navigating back in here, these values
- 7:12:02didn't change because both of them were
- 7:12:04basically calculating the same thing. I
- 7:12:05just prefer count uh rows over this. But
- 7:12:08all of the different reports and
- 7:12:10canvases that I'm using to use this
- 7:12:13measure are updated as well. Measures
- 7:12:15are great because they allow us to have
- 7:12:17a single source of truth. So you can
- 7:12:20catch yourself from inadvertently doing
- 7:12:22wrong calculations with implicit
- 7:12:24measures. Explicit measures help prevent
- 7:12:26that.
- 7:12:30So we've been doing previously a lot of
- 7:12:32job count and median yearly salary.
- 7:12:34Let's actually change this up a little
- 7:12:35bit and let's start putting to use those
- 7:12:37skills. What we're going to be
- 7:12:38calculating are these two measures.
- 7:12:41First, the easier one is that we want to
- 7:12:44calculate the skill count. So, how many
- 7:12:46skills are associated for a certain job
- 7:12:50title. Granted, this number doesn't
- 7:12:53really help us that much because if
- 7:12:55there's more job postings, the higher
- 7:12:57the job count, the higher the skill
- 7:12:58count. So there's nothing we can do with
- 7:13:00this until we turn it into a ratio of
- 7:13:04skills per job. And in that case, we can
- 7:13:08then see uh what is the amount of skills
- 7:13:11per a job actually normalized out. So
- 7:13:14let's get into building this. I'm going
- 7:13:15to start a new page for us to visualize
- 7:13:18this on. And we're going to do our first
- 7:13:21measure. We want to do it right inside
- 7:13:23of that measures table. We want to do
- 7:13:25that skill count. So I'm going to
- 7:13:26rightclick it and select new measure.
- 7:13:28Now for this we want to calculate
- 7:13:30obviously skill count. Keep the name
- 7:13:32real original. Use shift enter to go
- 7:13:34down to the next line. And we're going
- 7:13:36to follow a similar approach that we did
- 7:13:37for job count in that we're going to use
- 7:13:40count rows. And we want to use the
- 7:13:43skills job dim. Then we'll go ahead and
- 7:13:47close this function. Now, it's important
- 7:13:48to note we don't want to do the skills
- 7:13:50dim because remember the skills dim
- 7:13:53table is only a list of a single skill
- 7:13:57in there. We want to look at the skills
- 7:14:00job dim specifically the skill skill IDs
- 7:14:04cuz this has the list of each every
- 7:14:07individual skill and we can see it from
- 7:14:09the table view as well. Hey, there's
- 7:14:11multiple different jobs that can have
- 7:14:12multiple different skills. Anyway,
- 7:14:14navigating back into our report view.
- 7:14:16Looks like skill count. Skill count
- 7:14:17disappeared. I'm going to go ahead and
- 7:14:19select it again because I do want to add
- 7:14:21a comment on here. Shift enter down. And
- 7:14:24I'm just going to put in it's used to
- 7:14:25find the total count of skills for a job
- 7:14:27posting. Now, anytime I'm making any of
- 7:14:29these skills, I typically like to use
- 7:14:32either a matrix or a table to make sure
- 7:14:35that it's calculating correctly as I go.
- 7:14:37Feel is a little bit easier than using
- 7:14:39any other charts or visualizations. And
- 7:14:41for this, we want to look at the job
- 7:14:43title short level. So, I can put that
- 7:14:46into the rows. Putting this into focus
- 7:14:48mode so we can actually see it a little
- 7:14:50better. I can then do things like drag
- 7:14:53the skill count into the values column.
- 7:14:56And I'm noticing right now it's not
- 7:14:58really formatted how I want it. I can
- 7:15:00select it. This measure tools come up.
- 7:15:02I'm going to put in a comma. All right,
- 7:15:04looking good. Not too bad. I want to get
- 7:15:06out of this. Anytime I want the formula
- 7:15:08bar to disappear, I can just click over
- 7:15:09here in the data pane and select like
- 7:15:11another table just to get rid of it.
- 7:15:13Granted, it can't be a calculated table.
- 7:15:15Anyway, now we want to get skills per
- 7:15:18job. And conveniently, we've already
- 7:15:20done the job count. So, I'm going to
- 7:15:22drag it down here. What we can do is we
- 7:15:24can divide the skill count measure by
- 7:15:28the job count measure. So, let's create
- 7:15:30this measure. I'm going to rightclick
- 7:15:32measure, select new measure. We're going
- 7:15:34to call this skill per job. And for this
- 7:15:36one, we could do skill count, which the
- 7:15:40measure pops up, and then job count
- 7:15:42divided by in this type of syntax. It's
- 7:15:44going to be perfectly fine. I can go
- 7:15:46skills per job, drag it into here. It's
- 7:15:48calculating correctly. This is good, but
- 7:15:51not necessarily best practice. Instead,
- 7:15:54what I would like to see is I would use
- 7:15:56the divide function. And it's a safe
- 7:15:59divide function with the ability to
- 7:16:00handle divide by zero cases. So you
- 7:16:03don't have to deal with errors and stuff
- 7:16:05like that. In there, we just specify the
- 7:16:07nu numerator of skill count and then
- 7:16:09also the denominator of job count. Press
- 7:16:12enter. None of the values change. And
- 7:16:14then as best practice inside of here,
- 7:16:17I'm going to just enter in a comment
- 7:16:19that's used to find the ratio of skills
- 7:16:21required for job postings. Looks good.
- 7:16:23One thing is I don't like that it has
- 7:16:25two decimal places. So I'll select it
- 7:16:27and we're just going to put it down to
- 7:16:29one decimal place. It's just tmi. We
- 7:16:31don't need all that information. All
- 7:16:33right. Now sorting this table, we can
- 7:16:36see that things like senior data
- 7:16:37engineer, data engineers, senior data
- 7:16:40scientists, they're requiring more
- 7:16:42skills, whereas data analysts, business
- 7:16:45analysts are requiring less skills. This
- 7:16:48looks like it honestly correlates to
- 7:16:50something else that we've calculated
- 7:16:51previously. If I were to drag the median
- 7:16:53yearly salary also into here, we can see
- 7:16:56that there's a very strange correlation
- 7:17:00going on here. Almost like we could put
- 7:17:02this into a scatter plot or something.
- 7:17:04So, I'm going to insert in a scatter
- 7:17:06plot. Go into focus mode. I'm going to
- 7:17:08drag the median yearly salary into the
- 7:17:10x-axis. So, nice. It actually has the
- 7:17:12right column title and is formatted to
- 7:17:14the right currency. And then I'm going
- 7:17:16to drag skills per job into the yaxis.
- 7:17:20Now there's only one value. We want to
- 7:17:22break this up by job titles. Right? So
- 7:17:24I'm going to take the job title short
- 7:17:25and drag it into the values portion.
- 7:17:27I'll rename this as job title. And bam.
- 7:17:31Look at this correlation. I can even go
- 7:17:33in and insert in a trend line. Turn it
- 7:17:35on. This thing is definitely looking
- 7:17:38like there's some correlation between
- 7:17:40the number of skills and what is the
- 7:17:42median yearly salary. I probably would
- 7:17:44take this one step further under format
- 7:17:46your visual and I would turn on category
- 7:17:48labels. So now that we can actually see
- 7:17:51where the different job titles are and
- 7:17:52actually read it face on.
- 7:17:57We're going to shift gears a little bit
- 7:17:59and get theoretical specifically with
- 7:18:02these measures and with using DAX.
- 7:18:06There's different contexts that can
- 7:18:08actually happen. We're going to go
- 7:18:09through one by one and see how these
- 7:18:13different contexts can affect a in our
- 7:18:16case measure or even calculated columns.
- 7:18:19Overall, it's important to understand
- 7:18:21row context takes less priority than
- 7:18:23query context and takes less priority
- 7:18:25than filter context. That's getting an
- 7:18:28error of herself. Let's actually just
- 7:18:29look at what the heck is row context
- 7:18:32first. So, what the heck is row context?
- 7:18:35Well, as shown by this visual, row
- 7:18:38context refers to in this table the
- 7:18:41current row that a calculation is being
- 7:18:44applied. Specifically, we do we're doing
- 7:18:47a day of the week calculation and it's
- 7:18:50looking at only that current row in
- 7:18:52order to get that final answer of five
- 7:18:55for the day of week of January 4th for
- 7:18:58that Thursday. And we can demonstrate
- 7:18:59this by creating a new column and for
- 7:19:02the day of week setting this equal to
- 7:19:04the function of week day and specifying
- 7:19:07job posted date. So these DAX
- 7:19:09calculations inside of this calculated
- 7:19:11column are evaluating on a row context
- 7:19:14label. I say label I mean level.
- 7:19:19Now let's actually take this
- 7:19:20calculation. We don't need to calculate
- 7:19:21day of week in here. I'm not going to
- 7:19:23keep this one. Let's actually calculate
- 7:19:25something useful. Specifically, we did
- 7:19:27this explicit measure of skill per job.
- 7:19:31Is there a way we could use row context
- 7:19:34and provide how many skills are
- 7:19:36associated with a certain job? What we
- 7:19:39would need to do is do a calculated
- 7:19:42column in this job postings fact table
- 7:19:44and query the skills job dim table to
- 7:19:48get for every job posting what is the
- 7:19:51count of the associated rows for that
- 7:19:55particular job posting. So how will we
- 7:19:58do this? Well, I'm going to call this a
- 7:19:59the skill count and we're going to be
- 7:20:01doing count rows. And then it says, hey,
- 7:20:04insert a table. So like I said, we're
- 7:20:06going to insert in skills job dim and
- 7:20:09then go ahead and press enter. Now the
- 7:20:12problem is this is as you can see it's
- 7:20:152.2 million which if we remember or we
- 7:20:18can just actually navigate to it. We
- 7:20:20don't have to remember skills job dim is
- 7:20:222.2 million rows long. So this
- 7:20:25calculation that's going on inside of
- 7:20:27our fact table it's not right.
- 7:20:31Specifically I'm going to get rid of
- 7:20:32that value. We need to use a function
- 7:20:35called related table and it returns the
- 7:20:39related table filtered so that it only
- 7:20:42includes the related rows. And then from
- 7:20:45there we can insert in skill job dim.
- 7:20:48Put two closing parentheses on here.
- 7:20:50Press enter. Wa bing bang. We have an
- 7:20:53answer. This is pretty neat. And it says
- 7:20:55what skills or how many skills are
- 7:20:57associated for each of these different
- 7:20:59jobs. This is once again demonstrating
- 7:21:02that row context analysis.
- 7:21:08Now after row context, the next thing
- 7:21:10that's evaluated is the query context.
- 7:21:14And this determines which rows from a
- 7:21:16table are included in a calculation
- 7:21:19based on the filtered selection and
- 7:21:21visuals, relationships between tables,
- 7:21:24and then slicers and cross filtering.
- 7:21:26So, let's demonstrate query context that
- 7:21:29can be used to filter these visuals. We
- 7:21:32can do something like drag a slicer into
- 7:21:34here. And I'm going to drag job tile
- 7:21:35shorten here. Anyway, I can adjust the
- 7:21:38query context by changing which values
- 7:21:42we want to see. So, we can see business
- 7:21:43analyst or data analyst. And this query
- 7:21:47context will filter us down to in our
- 7:21:50case, we select the data analyst. It
- 7:21:52modifies the what this visual is going
- 7:21:54to show. Other ways we could do this of
- 7:21:57adjusting the query context is actually
- 7:22:00going into the filters and selecting
- 7:22:02what we want it to show here on the
- 7:22:04page. This applies this query context
- 7:22:06plays the filters on this visual filters
- 7:22:08on this page and filters on all pages.
- 7:22:10And the other thing that query context
- 7:22:12is controlled by is cross filtering. So
- 7:22:14if I select something like a machine
- 7:22:16learning engineer, it will cross filter
- 7:22:18there. This has applies a query context
- 7:22:20of machine learning engineer. Query
- 7:22:22context in my opinion is a little bit
- 7:22:25more abstract in that this is the
- 7:22:27specification sent by the visual itself
- 7:22:31whether doing that cross filtering
- 7:22:32filtering or even using slicers.
- 7:22:38The last one to discuss is filter
- 7:22:40context and filter context is applied on
- 7:22:43top of query context and on top of row
- 7:22:46context. We're going to demonstrate this
- 7:22:49shortly in that we can explicitly modify
- 7:22:52using DAX functions like calculate in
- 7:22:55order to control this filter context and
- 7:22:58thus undo things that are within the
- 7:23:00query or even row context. That's why
- 7:23:03we're just covering this cuz you need to
- 7:23:04understand there's different contexts.
- 7:23:06So let's demonstrate this filter
- 7:23:08context. And for this we're going to be
- 7:23:10using our skill count column that we
- 7:23:13just created. Remember, skill count is
- 7:23:15calculated at the row context level
- 7:23:18because it's a calculated column. And
- 7:23:20what we're going to be building with is
- 7:23:22this visualization here where we can get
- 7:23:25a sum of that skill count calculated
- 7:23:28column based on a different job title.
- 7:23:30But we can modify the filter context. If
- 7:23:33you notice here, we get 2.2 million
- 7:23:36grand total skill count. It's basically
- 7:23:39undoing that query context and modifying
- 7:23:41that filter context. Anyway, let's jump
- 7:23:43into it. Anyway, inside of here, I'm
- 7:23:45going to insert another matrix down at
- 7:23:47the bottom. Remember, we want to do this
- 7:23:48by the job title short on the rows. And
- 7:23:53previously, right, we created that skill
- 7:23:55count calculated column. And I'm going
- 7:23:57to drag that into the values. I'm going
- 7:23:59to put this into focus mode so we can
- 7:24:00see it. I'm not liking how this
- 7:24:02formatted, so I'm going to select skill
- 7:24:03count. We're going to change this to put
- 7:24:05a comma there. We're also going to sort
- 7:24:07this from high to low. Okay, so this is
- 7:24:10showing us the counts of the skills
- 7:24:13based on the different job title. We can
- 7:24:15also confirm this. I'm going to remove
- 7:24:16this, but I can drag in skill count from
- 7:24:18our measures and they are again the same
- 7:24:20values. So we are confirming that our
- 7:24:23calculated column is correct. Anyway,
- 7:24:25let's say we want a column that has the
- 7:24:28total counts of skills in there. For
- 7:24:31this one, we're going to create a new
- 7:24:34measure and we call this grand total
- 7:24:36skill count. And I'm going shift enter
- 7:24:38down. And so normally we would do
- 7:24:40something like this. We would do sum of.
- 7:24:43Remember we created that calculated
- 7:24:45column skill count. So I can go ahead
- 7:24:47and insert that in here. Close it. Press
- 7:24:50enter. I'm going to just drag it in.
- 7:24:52This is not what we want just yet. We
- 7:24:53still have to do modified. I'm going to
- 7:24:55drag it into the values. But it's doing
- 7:24:57that calculation here. I'm not liking
- 7:24:59how it's formatted. I'm going to format
- 7:25:01it correctly real quick. Anyway, that's
- 7:25:02not what we want, right? We want to get
- 7:25:04it to this where we actually see the
- 7:25:07grand total skill count popping up.
- 7:25:10Basically modifying that filter context.
- 7:25:13Well, for this we're going to use a very
- 7:25:15popular function that you need to get
- 7:25:17down and that is called calculate. This
- 7:25:20evaluates an expression within a
- 7:25:22modified filtered context. Hence, we can
- 7:25:26modify our filter context. So, this
- 7:25:28allows us to do it. Now, calculate is
- 7:25:31pretty simple in how we're going to
- 7:25:32execute it. Let's actually type it out
- 7:25:33instead of looking at it here. I don't
- 7:25:35like how it's written. I'm going to
- 7:25:36shift enter down. Type in calculate and
- 7:25:39then open parenthesis. All right. The
- 7:25:41first thing is it accepts an expression.
- 7:25:44In our case, this formula that we put in
- 7:25:47right here, this is an expression. I'm
- 7:25:50going to tab it over. So that is our
- 7:25:52expression. And then I'm going to put a
- 7:25:54comma. And then we can apply a filter
- 7:25:57after that. And that's actually optional
- 7:25:59as noted in the square brackets. So,
- 7:26:01what I'm going to do is I'm just going
- 7:26:03to shift enter down and put in another
- 7:26:06parenthesis. Press enter. Anyway, if we
- 7:26:08notice after running this, this grand
- 7:26:11total skill count did not change. It
- 7:26:13still correlates. So, the formula still
- 7:26:16works the same using calculate. But now
- 7:26:19I want to put on a filter into it.
- 7:26:22Filters are pretty easy and you probably
- 7:26:24know how to write them yourself. I'm
- 7:26:25going to do shift enter. I could do a
- 7:26:28filter something like this where I want
- 7:26:29to filter the job title short to be
- 7:26:32equal to data analyst and then running
- 7:26:35this we can see from this that all these
- 7:26:39values here are equal to that of the
- 7:26:41data analyst so that filter context
- 7:26:43overwrites it but we want to get that
- 7:26:46grand total so we want to look at the
- 7:26:47entire table if you will so we can use
- 7:26:51this function all it's also a popular
- 7:26:53function that you should know it returns
- 7:26:55all rows in a table or values in a
- 7:26:57column, ignoring any filters that may
- 7:26:59have been applied. So, I'm going to
- 7:27:00remove this filter that we just made.
- 7:27:02I'm going to type in that all function,
- 7:27:04and it takes a table name or column
- 7:27:06name. Our calculated column is in that
- 7:27:08job postings fact table. So, we're going
- 7:27:11to go ahead and put this. I'm going to
- 7:27:12press enter. And bam, now we have that
- 7:27:16value overriding and inputting it
- 7:27:18through our filter context. So, in
- 7:27:21recap, there are three different types
- 7:27:23of context. filter context which we most
- 7:27:26recently covered has the highest
- 7:27:28precedence. It overrides query and row
- 7:27:30context and you explicitly modify
- 7:27:32calculation environment using functions
- 7:27:34like calculate like we did. Next up is
- 7:27:37query context. It determines what subset
- 7:27:40of data to include based on the visual
- 7:27:43selection using things like cross filter
- 7:27:45filtering or even inside of a matrix how
- 7:27:47it can come out there. query context is
- 7:27:49going to override our row context level
- 7:27:52which has the lowest precedence and it
- 7:27:55operates at that individual row level
- 7:27:57like we demonstrated with calculated
- 7:27:58columns. Now this is an advanced topic
- 7:28:01but it's important that you understand
- 7:28:03what's going on here because you're
- 7:28:05going to get yourself into trouble if
- 7:28:07you don't understand this precedence and
- 7:28:08you start building more complex
- 7:28:10calculations with DAX. Trust me, I've
- 7:28:13gotten myself into plenty of trouble
- 7:28:14with this.
- 7:28:17Now, let's put this knowledge of
- 7:28:19different contexts to the test by
- 7:28:22building this visual here, which we're
- 7:28:25going to be able to break down basically
- 7:28:28what is the median yearly salary for all
- 7:28:31job postings and what is using modifying
- 7:28:34our filter context, what is the median
- 7:28:35yearly salary of only the US and we're
- 7:28:38going to be able to evaluate this at a
- 7:28:40skill count level. So, let's get into
- 7:28:43building it. For this, I'm going to
- 7:28:44remove some room and I'm going to remove
- 7:28:46the slicer. So, we've already calculated
- 7:28:48this median yearly salary. I want to now
- 7:28:52calculate what is the median year uh
- 7:28:54yearly salary just for the United
- 7:28:57States. You can also just modify this to
- 7:28:58any country that you that you live in.
- 7:29:01Um so, feel free to do that if you want
- 7:29:02to. Anyway, what I'm going to do to keep
- 7:29:04things simple, I'm just going to copy
- 7:29:05all this here and inside of measures,
- 7:29:07I'm going to create a new measure. I'm
- 7:29:10going to paste it in. We want to do this
- 7:29:12for the US. So this is my new measure
- 7:29:15and I'll modify the comment so that way
- 7:29:17it says for the United States. Now
- 7:29:20remember in order to do this we going we
- 7:29:24are going to use the calculate function.
- 7:29:27So I'm going to type in calculate and
- 7:29:28then shift enter down. We want to do the
- 7:29:31median value of salary year average and
- 7:29:36we want to put a filter on it. So I'm
- 7:29:39going shift enter down for that. And for
- 7:29:41that filter, we want to make sure that
- 7:29:42the job country is equal to the United
- 7:29:46States. If you do a different country,
- 7:29:48you need to make sure that you spell it
- 7:29:49correctly. Okay, I'm going to go ahead
- 7:29:51and press shift enter and then close the
- 7:29:54parenthesis and press enter. So, let's
- 7:29:57actually see this bad boy in action. I'm
- 7:29:59going to create a clustered bar chart
- 7:30:02down here. And I'm going drag the median
- 7:30:05yearly salary into the x- axis and
- 7:30:07median yearly salary for the US also in
- 7:30:09here. Making it slightly bigger. We can
- 7:30:12see which is pretty interesting. The
- 7:30:14median salary for the US is slightly
- 7:30:18lower. Also not liking how this number's
- 7:30:20formatted. I'm going select this format
- 7:30:22as currency and change this to zero
- 7:30:25decimal places. Now, one thing to note
- 7:30:27with this calculation that we currently
- 7:30:28have, median yearly salary, I retyped in
- 7:30:32this right here, which if we look at the
- 7:30:34median yearly salary, it is the same
- 7:30:37calculation. And it looks like it does
- 7:30:39hint uh this red highlighting mainly
- 7:30:41because normally it's not written like
- 7:30:43this with this extra spacing. I just did
- 7:30:44that for demo purposes earlier. So, I'm
- 7:30:46going to clean that up real quick. Press
- 7:30:48enter. Anyway, this is the same thing.
- 7:30:51So inside of this median yearly salary
- 7:30:53what would actually be better practice
- 7:30:55instead of using this is referencing
- 7:30:58directly that other measure itself it is
- 7:31:02still an expression whenever I press
- 7:31:04enter the value is still the same um so
- 7:31:06I know it's working and yeah and so this
- 7:31:09case we're still using that filter
- 7:31:11context to filter down to this now we
- 7:31:13want to get it by the count of skills so
- 7:31:17in that job postings t fact table I'm
- 7:31:19going to drag in the skill count to the
- 7:31:21y-axis. Now, it goes all the way up to
- 7:31:24this level, which looks like it's like
- 7:31:2635. But when we get start getting
- 7:31:28higher, right, there's less values
- 7:31:29because the likelihood that there's 34
- 7:31:32skills in a job posting is pretty low.
- 7:31:34So, I'm going to filter it down. So,
- 7:31:36we'll adjust the query context by going
- 7:31:39to filters. Know it's sort of
- 7:31:40counterintuitive, but we're adjusting
- 7:31:41the query context in this case. We'll
- 7:31:43leave it as advanced filter, and we'll
- 7:31:45say when it's less than, we'll say 15
- 7:31:48values. All right, so not bad. We can
- 7:31:51clearly see with this that for less
- 7:31:54skills, you get paid less money. And as
- 7:31:57the skills go up, the pay goes up. And
- 7:31:59when comparing it to the United States
- 7:32:02in our case, honestly, we're not seeing
- 7:32:04that big of a difference. And that's
- 7:32:06mainly because the United States is such
- 7:32:10a large portion of this data set. Feel
- 7:32:12free to try out different countries as
- 7:32:14well, and let me know if you find any
- 7:32:16characteristics about it in the
- 7:32:17comments.
- 7:32:20Now, one quick refresher that we covered
- 7:32:22all the way back in the first chapter,
- 7:32:24and that's on DAX query view. You can
- 7:32:27also use this to evaluate your different
- 7:32:30measures that you've come up with and
- 7:32:32are creating. I just find it's a little
- 7:32:35bit more difficult as it takes some more
- 7:32:37DAX knowledge, but you could actually do
- 7:32:39this without DAX. In the case of job
- 7:32:40count, I can rightclick this and they
- 7:32:43have this quick queries. If I do
- 7:32:45evaluate in the upper portion right
- 7:32:48here, it writes out the DAX in order to
- 7:32:50get job count below this. So just put it
- 7:32:54anyway, the values down here for job
- 7:32:55count. Now another option is I can
- 7:32:57rightclick job count, go to quick
- 7:32:58queries, I can go to define and evaluate
- 7:33:02making a little bit bigger room with
- 7:33:03this. Now with this one, because I did
- 7:33:06define and evaluate, it still has the
- 7:33:09same syntax you notice below. But what
- 7:33:11is nice about this is they have this
- 7:33:13option up here of update update model
- 7:33:15overwrite measures. You can if you want
- 7:33:18if you wanted to create or update this
- 7:33:20measure like I could make this back into
- 7:33:22using count of job ID and then I can run
- 7:33:26it. Okay, I'm getting the same value and
- 7:33:28then I can just update the model and it
- 7:33:31says hey do you want to update the
- 7:33:32model? Are you sure? and it updates the
- 7:33:34model that disappears. And whenever I go
- 7:33:36into job count when looking at it from
- 7:33:38something like the query view, I can see
- 7:33:40that okay, it did update. But I don't
- 7:33:43actually want to update it. I'm going to
- 7:33:45change this back to this bad boy. I'm
- 7:33:47going to say update model and update it.
- 7:33:49Here this is a really good environment
- 7:33:51in the case like our median yearly
- 7:33:53salary. Going to define and evaluate. In
- 7:33:56our case, right, we had multiple
- 7:33:59different levels of the formula itself.
- 7:34:02This is a good case if you were getting
- 7:34:04complex queries to go in and actually
- 7:34:06edit it and then update the values based
- 7:34:08on what you need to mainly just want to
- 7:34:10share as an option because this DAX
- 7:34:12query view is a newer feature inside of
- 7:34:13PowerBI so some people aren't familiar
- 7:34:15with it. All right, it's now your turn
- 7:34:18to give it a try and jump in creating
- 7:34:20some different explicit measures and
- 7:34:22messing around with those different
- 7:34:24context to better understand it. With
- 7:34:26that, there's only one more lesson left
- 7:34:28and for that we're going to be jumping
- 7:34:29into parameters and that uses DAX. With
- 7:34:32that, I'll see you there.
- 7:34:37Welcome to this last lesson in DAX. And
- 7:34:40this one, pretty fun one. We're going to
- 7:34:42be doing it on parameters, which these
- 7:34:44allow our end users who may not be as
- 7:34:47familiar with all the intricacies of
- 7:34:48PowerBI to actually change up what
- 7:34:51inputs they have inside of a chart and
- 7:34:54get more of what they want and explore
- 7:34:57the data better. Let me show you what I
- 7:34:58mean. Here I have two charts. The one on
- 7:35:01the left is showing based on the job
- 7:35:03title the median yearly salary. The one
- 7:35:05right is showing basically the same
- 7:35:07thing for job count. Anyway, parameters
- 7:35:09are what we're going to be creating in
- 7:35:10this. And this slicer up in the top
- 7:35:12allow us to select different parameters.
- 7:35:14So in this case, I can change the yaxis
- 7:35:18from something like the job title to
- 7:35:20skill to even country or even company
- 7:35:24allowing me to change up this view. And
- 7:35:26it's not only limited to like in this
- 7:35:29case the y-axis, we could change up the
- 7:35:31x-axis. So right now I have selected job
- 7:35:34count for this uh visual below. I could
- 7:35:36change it to something like median
- 7:35:38yearly salary. Now, both of these
- 7:35:40examples are what is known as a field
- 7:35:43parameter. Now, both of these are known
- 7:35:45as a field parameter as we're allowed to
- 7:35:49input into this different column names
- 7:35:52or even different measures. Now, besides
- 7:35:55those, they also have numeric
- 7:35:57parameters, and this allows us to
- 7:35:59perform more of a whatif analysis.
- 7:36:02Here's a scenario we're going to be
- 7:36:04doing at the second half of this lesson.
- 7:36:06And in it, we're trying to find out,
- 7:36:08yeah, what are the top paying jobs, but
- 7:36:09more specifically, what is our take-home
- 7:36:12pay going to be? In the United States,
- 7:36:14tax rates can be up to 35%.
- 7:36:18And this will allow us via a slider to
- 7:36:21adjust what our different rates are for
- 7:36:25this. And as you can see, it adjusts our
- 7:36:28final values in the visuals below. Now,
- 7:36:30numeric parameters are more prevalent
- 7:36:33within forecasting scenarios and even
- 7:36:36things like financial modeling. So,
- 7:36:38personally, I find this that it comes
- 7:36:41second to those field parameters. So,
- 7:36:43that's why we're covering this second.
- 7:36:48Let's jump into creating our first field
- 7:36:49parameter. And in this one, I want to be
- 7:36:52able to view based on the median yearly
- 7:36:55salary it from different types of views,
- 7:36:58if you will. such as job tiles, country,
- 7:37:01company, and also skills. So, we're
- 7:37:04going to create a parameter to do this.
- 7:37:06For this, feel free to continue to work
- 7:37:07with the report from the last lesson, or
- 7:37:09if you lost, you can just use that
- 7:37:12explicit measures, and we're going to be
- 7:37:13taking it off from there. Inside of
- 7:37:15here, I'm going to create a new page,
- 7:37:16and I'm going to name it parameters. So,
- 7:37:18parameters are accessed underneath the
- 7:37:21modeling tab. And inside of here under
- 7:37:25new parameters, we can make either a
- 7:37:27numeric range or a field parameter. Now,
- 7:37:30I do want to call out something real
- 7:37:31quick cuz you've probably seen it
- 7:37:32before. And that's with on the home tab
- 7:37:36under transform data. Transform data. We
- 7:37:39have a section. Right now, it's grayed
- 7:37:41out, but we have a section called edit
- 7:37:44parameters and also edit variables.
- 7:37:46These, although somewhat related, aren't
- 7:37:49the same parameters that we're going to
- 7:37:51create inside of here. Specifically,
- 7:37:52this is the parameters within Power
- 7:37:55Query, hence why it's in that same drop
- 7:37:58down for transform data, which opens up
- 7:37:59the Power Query editor. And these
- 7:38:02parameters are similar in that you can
- 7:38:04use it to change up different fields,
- 7:38:06but usually use them to like change to
- 7:38:08different data sources very easily.
- 7:38:10Anyway, that's beyond the scope of this.
- 7:38:11I just wanted to point it out in case
- 7:38:12you had questions about it. So, back to
- 7:38:14the modeling tab under new parameters.
- 7:38:16We're going to do the first one first of
- 7:38:18fields. If you accidentally select the
- 7:38:20wrong one, you can change it inside of
- 7:38:22here. Anyway, we're changing back to
- 7:38:24fields. And for the name of this, I know
- 7:38:25I'm going to put into a slicer. So, I
- 7:38:27give it a name that basically cues the
- 7:38:30user in that they can select with this.
- 7:38:32So, we can do something like either
- 7:38:34select category or select value. We'll
- 7:38:36just do select category. Next up, we
- 7:38:38need to start dragging the applicable
- 7:38:39columns that we want into there. I know
- 7:38:41I want job title short job country
- 7:38:44skills specifically from the skills
- 7:38:46dimensional table because we want that
- 7:38:48name and then finally we want company
- 7:38:51which you actually have to input in name
- 7:38:53if you want to get that from company
- 7:38:54dim. It asks at the bottom do I want to
- 7:38:56add the slice to the page? You bet I do.
- 7:38:58Select create. I'm going to move this
- 7:39:00slicer down just to show but we have our
- 7:39:03name of select category and then look at
- 7:39:05all these names. Especially this one of
- 7:39:07name that's not really readable like
- 7:39:11what is that? So luckily for us we know
- 7:39:14DAX now and this is the formula behind
- 7:39:18how this parameter is created. Also with
- 7:39:21that over here in the right hand side of
- 7:39:22the data pane we have this select
- 7:39:25category and if we view it within the
- 7:39:28table view we can see that it has three
- 7:39:31different attributes about it or three
- 7:39:33different columns. It has the select
- 7:39:34category column, the select category
- 7:39:36fields, which it tells it what are those
- 7:39:39different columns that I should be
- 7:39:40using, and the select category order.
- 7:39:43What order should it put it specifically
- 7:39:44in a slicer? Obviously, you know, we
- 7:39:46can't edit it from right here. So, we're
- 7:39:48going to edit it from that formula bar.
- 7:39:50Change job title short to just job
- 7:39:52title, job country to country, skills to
- 7:39:56just skills with a capital S, and then
- 7:39:59name to company. Pressing enter, see our
- 7:40:02slicer updates below. If I want to
- 7:40:04change the uh the order in this slicer,
- 7:40:06say I wanted skills actually second,
- 7:40:09which we need to put it number one for
- 7:40:11this one and then country uh third. So
- 7:40:14that one needs to be two. Got to love
- 7:40:15the index of zero. I can do that and
- 7:40:18then it updates below as well. All
- 7:40:19right, so let's now use this in a
- 7:40:21visualization. I'm going to put select
- 7:40:23category up in the top and then put a
- 7:40:25bar chart underneath it. We want to look
- 7:40:27at the median yearly salary. So, I'll
- 7:40:29take that and drag that into the x-axis.
- 7:40:32And then normally remember we go for
- 7:40:33like the job postings fact table. Drag
- 7:40:35in job title shortened to here. But that
- 7:40:38doesn't help us here, right? Because we
- 7:40:39want to be able to control the actual
- 7:40:42view within here. So, we have to add
- 7:40:45this to this visualization. So, I'm
- 7:40:48going uncheck this and we want to go to
- 7:40:50that select category here. Specifically,
- 7:40:52this of select category, put it into the
- 7:40:54yaxis and bam, here it is below. And now
- 7:40:58whenever I select different options. So
- 7:41:00skills it updates for the skills the
- 7:41:03country and then also company. Now you
- 7:41:06can't do multiple values with this. So
- 7:41:09we need to change this visual to make
- 7:41:11sure that it our users work with this
- 7:41:13properly. So under format visual I'm
- 7:41:15going to go into our slicer settings and
- 7:41:17I'm going to change this to a title
- 7:41:19along with under selection going to make
- 7:41:21sure that only single select is allowed.
- 7:41:24Now, we've only demonstrated the y-axis
- 7:41:27in this or the categories. What if we
- 7:41:29want to change this one down here with
- 7:41:31specifically with different measures we
- 7:41:33have built? Well, let's create a
- 7:41:35parameter for that. And for this, we're
- 7:41:37going to be switching between median
- 7:41:38yearly salary and the total job count.
- 7:41:42So, under modeling, new parameters,
- 7:41:44we'll go to fields. For the name, we'll
- 7:41:47use select measure. And inside of here,
- 7:41:49we're going to drag in that job count
- 7:41:51and then also that median yearly salary
- 7:41:54and click create. These names are
- 7:41:56already good enough for how I like it.
- 7:41:58This is looking good. I do want to
- 7:42:00format this visual in the fact that I
- 7:42:03only want it to be a single select. And
- 7:42:05then also let's make it look similar
- 7:42:06being a tile. So now we can switch
- 7:42:08between this median yearly salary and
- 7:42:10this job count. But it's not doing
- 7:42:12anything on our visual. I can create
- 7:42:13another visual. But I actually want to
- 7:42:15demonstrate how we can use this on this
- 7:42:17visual right here. So I'm going to
- 7:42:19remove median yearly salary. And then
- 7:42:21for select measure, I'm going to drag it
- 7:42:24into the x-axis. I'm going to make this
- 7:42:26a little bit bigger now. But now I can
- 7:42:29switch up between median yearly salary
- 7:42:31and job count. And we can do this for
- 7:42:34country, company, median, yearly salary.
- 7:42:37This is pretty neat and allows a dynamic
- 7:42:39access and manipulation of our
- 7:42:42visualizations. Now, one quick note.
- 7:42:44This one here of select measures.
- 7:42:46Remember, we're doing the aggregation
- 7:42:47with a measure, but I'm going to demo
- 7:42:49something real quick. You don't have to
- 7:42:51follow along with this portion. I'm
- 7:42:52going to demo something that doesn't
- 7:42:54work that you need to be aware of when
- 7:42:56building this. Specifically, let's say
- 7:42:58we're creating a new parameter. We'll
- 7:43:00say it's a field as well, right? And we
- 7:43:02wanted to select between yearly and
- 7:43:04hourly salary. Should be yearly or
- 7:43:07hourly salary. Anyway, inside our job
- 7:43:09postings fact table, right, we do have
- 7:43:10this salary hour average and that salary
- 7:43:14year average. I'm going to go ahead and
- 7:43:16just create this. Now, let's say with
- 7:43:18this slicer, let's say we were just
- 7:43:19replacing this one up here, and we want
- 7:43:22to put it inside of this visualization.
- 7:43:24So, I come to select salary yearly or
- 7:43:27hourly, remove the select measures, and
- 7:43:30I drag this into the x-axis. Okay, this
- 7:43:33is not going to work. And even when I
- 7:43:36select these different ones, it's not
- 7:43:38going to work. And this is because right
- 7:43:41these are columns and we're trying to do
- 7:43:44an aggregation on the xaxis. Previously,
- 7:43:48we were doing either count of jobs or a
- 7:43:50median of the salaries. It doesn't know
- 7:43:51what to do by default and so it's not
- 7:43:53even going to make a visual and it's
- 7:43:55going to end up breaking. So going to
- 7:43:56get rid of this and drag select measures
- 7:43:59back in like we liked. Additionally, I'm
- 7:44:01not keeping this cuz it's broken. So I'm
- 7:44:03going to remove it. And also I'm going
- 7:44:04to delete this from our model because it
- 7:44:07doesn't work. All right, so bam back to
- 7:44:09working properly.
- 7:44:13Next up, let's get into a numeric
- 7:44:16parameter. And for this, we're going to
- 7:44:18be building this one here on selecting
- 7:44:21the deduction rate. Now, this one we're
- 7:44:23going to have to do a little bit more
- 7:44:25works because yes, we can set up our
- 7:44:27numeric parameter very similar to how we
- 7:44:29set up our field parameter, but then we
- 7:44:31actually have to implement it into a DAX
- 7:44:35calculation or an explicit measure in
- 7:44:38order to calculate what we're trying to
- 7:44:40do with this deduction rate. Basically,
- 7:44:42we're trying to take a deduction of the
- 7:44:44median yearly salary. So, this one's
- 7:44:45going to take multiple steps. So, I
- 7:44:47created a new page and then under new
- 7:44:49parameters, we're going to create that
- 7:44:50numeric range. We'll call this select
- 7:44:53deduction rate. For the minimum, we're
- 7:44:55going to be doing zero. Maximum, we'll
- 7:44:57go to we'll say 50%, but in this case,
- 7:44:59we need to put a decimal. So 0.5. And
- 7:45:02then for the increments, we're going to
- 7:45:03do that of 0.01
- 7:45:06increments. For this, the typical tax
- 7:45:08rate, at least in the United States, is
- 7:45:1020%, so we'll do 0.2 for this. So me,
- 7:45:13I'm noticing the red values. I skipped
- 7:45:14over this. The data type, we have to
- 7:45:16make sure that this is a decimal number.
- 7:45:18Anyway, all those red boxes are cleared.
- 7:45:20We want to add a slicer to this page.
- 7:45:22Create. Okay. I'm going to drag that
- 7:45:23across the top here. Next up, let's
- 7:45:25create a visualization that we can
- 7:45:26actually use this on. So, I'm going to
- 7:45:28insert in a stack bar chart and we'll
- 7:45:30have median yearly salary on the x-axis
- 7:45:33and then a job title short on the yaxis.
- 7:45:36I'm going to change this name to job
- 7:45:37title. Now we need to go into
- 7:45:39implementing this into where we want to
- 7:45:43take whatever deduction rate we select
- 7:45:45from here from our slicer to basically
- 7:45:49deduct from our median yearly salary
- 7:45:51here. One quick note, notice I made an
- 7:45:53error. I have the stack bar chart. We
- 7:45:56want these the new measure that we
- 7:45:57created right next to it. So I'm going
- 7:45:58to change this to a clustered bar chart.
- 7:46:00Should be no change visually. So let's
- 7:46:02get into creating this measure using
- 7:46:04median yearly salary. So I'm going to
- 7:46:05say I want a new measure. We'll call
- 7:46:07this median yearly take-home pay. Press
- 7:46:10shift enter to get down. And for this,
- 7:46:13we want to use that median yearly salary
- 7:46:16value. And then we want to subtract our
- 7:46:18deduction rate. So, we're going to do a
- 7:46:20little bit of algebra here. We're going
- 7:46:22to multiply times 1 minus that deduction
- 7:46:26rate. But what the heck is that? How how
- 7:46:29do we get this deduction rate in here?
- 7:46:31Well, if we go to that select deduction
- 7:46:33rate right here, and it's giving me an
- 7:46:35error right now because I exited out of
- 7:46:36that. It's fine. I have notice compared
- 7:46:38to the other ones of select category,
- 7:46:40they only have one value, but select
- 7:46:42deduction rate has two values. And this
- 7:46:47second one right here is, we can see by
- 7:46:49the icon, a measure, and that's what we
- 7:46:52want to use. We want to use that select
- 7:46:54deduction rate. So, typing in select
- 7:46:56deduction rate, it's popping right up.
- 7:46:58I'm going to do that and then close the
- 7:47:00parentheses. So, just so you're aware of
- 7:47:02what's going on here, right? If I have a
- 7:47:03deduction rate of 20 or 0.2, we're going
- 7:47:06to do 1 minus.2 that gives8.8
- 7:47:10times our median yearly salary. Makes
- 7:47:13sense. Let's press enter. Now, whenever
- 7:47:15we do this and move this, nothing's
- 7:47:17going to happen because we haven't added
- 7:47:18to our chart. So, with our visual
- 7:47:20selected, I'm going add median yearly
- 7:47:22take-home pay underneath here. And now
- 7:47:25whenever we adjust this we can see what
- 7:47:27it needs to be. So at 0% just testing it
- 7:47:30out both of these are equal as expected
- 7:47:33and then doing a 50% it is half of this.
- 7:47:37So pretty neat implementation of numeric
- 7:47:40parameters.
- 7:47:43Now DAX has a lot more features to cover
- 7:47:47more than I can cover in this video.
- 7:47:48Frankly, I can make a whole course about
- 7:47:50it and I did actually twice on data camp
- 7:47:54specifically. I have two other courses I
- 7:47:56would recommend after this if you want
- 7:47:58to learn more about DAX. The first one
- 7:48:00is just DAX functions in PowerBI. I'm
- 7:48:03listed down here as the collaborator. I
- 7:48:05was basically the brains behind the
- 7:48:06scenes putting this course together. And
- 7:48:09this goes into all the basics of DAX.
- 7:48:12When we get into iterating functions in
- 7:48:14chapter 4 of this module or of this
- 7:48:17course, that's when we start covering
- 7:48:18more new stuff that we didn't cover in
- 7:48:20here. The second course that I helped
- 7:48:23create was intermediate DAX and PowerBI.
- 7:48:26This one has a lot of things in here
- 7:48:28that we didn't even cover in this course
- 7:48:30that are frankly intermediate. Here I am
- 7:48:32listed as collaborator down here.
- 7:48:34Anyway, this would also be a great
- 7:48:36option to dive into next if you want to
- 7:48:38learn more with DAX. I may consider in
- 7:48:41the future building a second PowerBI
- 7:48:44course, basically getting into advanced
- 7:48:46DAXs and encompassing all these
- 7:48:48different other techniques. So, if
- 7:48:50you're interested that, let me know in
- 7:48:51the comments below. Anyway, that was our
- 7:48:53last lesson of actually learning what to
- 7:48:55do with PowerBI. We're now going to be
- 7:48:57jumping next into the final project,
- 7:49:00applying all those different concepts
- 7:49:01we've learned, and building something
- 7:49:04out super special. Oh, I forgot to
- 7:49:06mention you do have some practice
- 7:49:07problems, your last set of practice
- 7:49:08problems to go through and test out
- 7:49:10parameters with. Anyway, and with that,
- 7:49:12actually, see you in the next one.
- 7:49:18All right, welcome to this final section
- 7:49:20where we're going to be tackling our
- 7:49:21last project. And this is going to be
- 7:49:23broken into two videos. First one is
- 7:49:26actually building out our dashboard and
- 7:49:28the second one is getting into my
- 7:49:30recommended ways for sharing it. Now,
- 7:49:32I'm going to start with this. You can
- 7:49:33feel free to follow along in this video
- 7:49:36and build out the recommendations that
- 7:49:38I'm going to recommend for building out
- 7:49:41our second project, but I highly
- 7:49:44recommend that instead you if you want
- 7:49:47to, you can watch it, but I recommend
- 7:49:48just skipping it and you dive deep and
- 7:49:52build out your own dashboard that you
- 7:49:55find usable and beneficial to you. Truth
- 7:49:59be told, I'm not going to be there
- 7:50:00holding your hand in the real world,
- 7:50:02guiding you along on what you need to
- 7:50:03do. So, you need to take the initiative
- 7:50:05now and start coming up with ideas on
- 7:50:07how you can actually build effective
- 7:50:09visualizations. So, with that, I'm going
- 7:50:11to provide first some constructive
- 7:50:13feedback on our last project. That way,
- 7:50:17it can maybe inspire some ideas on what
- 7:50:19you could build out. Then, from there,
- 7:50:21I'm going to build out what I want to
- 7:50:22actually build.
- 7:50:26So, let's get back into some feedback
- 7:50:27that I have on this first dashboard. And
- 7:50:30as a reminder, remember it was two
- 7:50:32pages. We have our first actual landing
- 7:50:34page dashboard, and then in the second
- 7:50:36page, we're allowed to drill through
- 7:50:38into particular job titles so we can
- 7:50:41dive deeper into insights. Anyway, I've
- 7:50:43been using this bad boy while going
- 7:50:45through and building this course, and I
- 7:50:47have some thoughts on things I want to
- 7:50:49improve on it based on my real world
- 7:50:51experience with implementing dashboards.
- 7:50:53Anyway, the first thing is this. The
- 7:50:55KPIs, specifically those cards up at the
- 7:50:57top on the main dashboard, are really
- 7:51:01beneficial. I really like them, and I
- 7:51:03like that they provide value immediately
- 7:51:05to me on what I'm looking for. Now,
- 7:51:07regarding all the other visualizations,
- 7:51:09they're great, but I particularly like
- 7:51:12the visuals on hourly and yearly salary.
- 7:51:15This scatter plot, not going to lie,
- 7:51:16it's a little hard to read, but I do
- 7:51:19like down here these different plots or
- 7:51:22these different charts we've implemented
- 7:51:24into our matrix to show this. We don't
- 7:51:26need to necessarily do it like this, but
- 7:51:28maybe we could use parameters to build
- 7:51:30something with this. Here's some other
- 7:51:32areas that I want to tweak. The KPIs or
- 7:51:35the cards I said I did like, but that
- 7:51:38average job rating, it's very unclear on
- 7:51:40what actually is going on there. and
- 7:51:43frankly is biased to what I had set up
- 7:51:45for this fivestar system. Also looking
- 7:51:47at it holistically with the main page
- 7:51:49and also with that drill through page,
- 7:51:52there's just too many visuals for my
- 7:51:54liking. I want to drill it down to only
- 7:51:57the core visuals necessary. And although
- 7:52:00the drill through feature was really
- 7:52:02nice and fancy, in my practice, I'm not
- 7:52:05seeing it getting used as much unless
- 7:52:07you're actually training your users on
- 7:52:09it. So here are my top features that I
- 7:52:11definitely want to include on this. I
- 7:52:13want to focus on two things mainly
- 7:52:16skills and then salary of jobs. For the
- 7:52:19skill data I want to show pre like we
- 7:52:21showed previously the counts but also it
- 7:52:23in a relative percentage like how many
- 7:52:26jobs are requesting Python. And then for
- 7:52:28the salary I want to do this for job
- 7:52:30titles and I want to be able to easily
- 7:52:33flip between analyzing for hourly or
- 7:52:36yearly. Now, the last two things are
- 7:52:38things that I've actually gotten
- 7:52:39insights from this website of my dad.te
- 7:52:43and that was this country filter was a
- 7:52:46really big demand in my subscribers. I
- 7:52:48initially when I built this didn't have
- 7:52:49this and everybody was commenting
- 7:52:51include a country filter. Also, I really
- 7:52:53like the well the aesthetics of this
- 7:52:56specifically how it's more of a dark
- 7:52:57theme with it. So, that's the last two
- 7:52:59things. We're going to add a country
- 7:53:00slicer and also we're going to be using
- 7:53:02dark mode.
- 7:53:06So, let's get into rough drafting out
- 7:53:08this dashboard. As a reminder, you're
- 7:53:11following along with me. Completely
- 7:53:12optional. However you want to do it,
- 7:53:14feel free to do it and modify as
- 7:53:15necessary. Anyway, in the first
- 7:53:16dashboard that we built, I actually
- 7:53:18physically wrote this out. Yeah, I know
- 7:53:20this is my bad handwriting. And I
- 7:53:22actually physically drew this out, but I
- 7:53:24don't always do this. Instead, I like to
- 7:53:26sometimes just play around in PowerBI
- 7:53:28shaping things and rough drafting it
- 7:53:29that way. So, that's what we're going to
- 7:53:30do for this one. For this, you can start
- 7:53:32off with the file that we used in the
- 7:53:34last lesson, which if you got lost along
- 7:53:37the way, just go into that DAX folder is
- 7:53:38that last one of parameters. We want to
- 7:53:41use that same data model that we created
- 7:53:44previously. And so all of that different
- 7:53:46work we're going to keep. I'm just going
- 7:53:48to end up getting rid of all these
- 7:53:49different sheets towards the end.
- 7:53:50Anyway, I'm going to start a new page
- 7:53:51here and call it data jobs 2.0. Now,
- 7:53:54we're going to be implementing a dark
- 7:53:56theme on this. So, I'm going to go ahead
- 7:53:58actually right now into view and under
- 7:54:01themes I'm going to change it to I
- 7:54:03really like this theme right here, this
- 7:54:04innovate. And I'm going to change it to
- 7:54:06this. But I'll be honest, this isn't
- 7:54:09dark theme enough for me specifically. I
- 7:54:11want to work in a dark theme too, too.
- 7:54:13So, going into files and under options
- 7:54:15and settings and options, we can go into
- 7:54:18report settings and I'm going to
- 7:54:19actually change my layout from this
- 7:54:21portion to a dark theme. Bam. All right.
- 7:54:25Now we're ready to build with dark
- 7:54:27theme. So remember my two main areas
- 7:54:30that I want on this on features. I want
- 7:54:33one area or one half focusing on skills
- 7:54:36and then the other half focusing on
- 7:54:39salary. So I'm going to put two visuals
- 7:54:41on there to get started. Personally I
- 7:54:43prioritize skills over salary because
- 7:54:45you need the skills to get the salary.
- 7:54:47So stealing this from our skills stats
- 7:54:50page that we built. I'm gonna take this
- 7:54:52visual, control C, and then put this in
- 7:54:54here. I'm going to lower it some because
- 7:54:56like you like before, we want a great
- 7:54:58design layout where we have the KPIs up
- 7:55:00at top and then the visuals below. Other
- 7:55:03thing is I want to make sure this is
- 7:55:05centered. All right, looking good. Next
- 7:55:08thing I want is remember those salaries.
- 7:55:11And for this one, I'm going to use that
- 7:55:13new measure check page that we have
- 7:55:15created right here. And I'm going to
- 7:55:16copy this one down here that has all
- 7:55:18these different ones in here. And then
- 7:55:20paste it in. I'm not realizing I should
- 7:55:23have got the skills one from there, too,
- 7:55:24because right now this job count isn't
- 7:55:27using our measure that we created. So,
- 7:55:30I'm going to actually delete that out of
- 7:55:31there and drag job count into here. And
- 7:55:33then update that y-axis to say skill.
- 7:55:35All right. So, remember, I'm just rough
- 7:55:36drafting right now. I do want KPIs on
- 7:55:39top of here. So, we're going to be using
- 7:55:41that card new. Make sure you don't
- 7:55:43select the actual visual and do this.
- 7:55:45I'm I'm going control Z this. I didn't
- 7:55:47have the outside selected. I'm insert in
- 7:55:49card new and I'm going to drag this
- 7:55:52along this top area right here. We're
- 7:55:55going to put titles and slicers up at
- 7:55:56the top. So that's why I'm going to
- 7:55:57leave that space. Now in this I'm going
- 7:56:00to have four different KPIs. I want the
- 7:56:02leftmost to deal with well like counts
- 7:56:05and skills. So I'm going to drag job
- 7:56:08count into here and then also skills per
- 7:56:10job. And then over on top of this one,
- 7:56:13don't worry, this is going to shift over
- 7:56:14as soon as you add more. Over on top of
- 7:56:16this one, I want things like the yearly
- 7:56:18and then also hourly salary. So I'll
- 7:56:21drag median yearly salary in. I notice
- 7:56:24also that we don't have anything for
- 7:56:26hourly. So what I'm going to do is going
- 7:56:27to copy the median yearly salary. Right
- 7:56:30click, create a new measure. Paste this
- 7:56:33one in. Replace everything for hourly.
- 7:56:36And everything is updated. Press enter.
- 7:56:38And now going and dragging in median
- 7:56:40hourly salary with that slicer selected.
- 7:56:44Only three things are showing. That's
- 7:56:46because under format your visual the
- 7:56:48layout right now it says max card shown
- 7:56:51three. We want to bump that up to four.
- 7:56:53I also don't like this border around
- 7:56:55each of those cards. So I'm going to
- 7:56:57select border or type in border. And
- 7:56:59then underneath cards I see that that's
- 7:57:02the border that I want. I'm going to
- 7:57:03undo it. I also don't like how these are
- 7:57:05not centered. They're all left aligned.
- 7:57:07So, inside of callout values, I'm going
- 7:57:09to go down here and just center those.
- 7:57:12All right, not too bad. Let's insert in
- 7:57:14a title and some put put some slicers up
- 7:57:16at the top. Put in data jobs dashboard
- 7:57:192.0. Made it a 36 point font and then
- 7:57:23put it in bold. All right. Now, let's
- 7:57:25add in some slicers. Remember, we want
- 7:57:28to slice two things. We want to slice
- 7:57:29that job title short and then also the
- 7:57:32country. But let's actually format this
- 7:57:35one how we actually want it to look. and
- 7:57:36then we'll copy it. Specifically under
- 7:57:39format visual, the style, we're going to
- 7:57:41change this to a drop down. I'm also
- 7:57:44going to make the values a little bit
- 7:57:45bigger so that way you can see it. Go
- 7:57:47size 14. Inside of here, I want a few
- 7:57:50different options. Specifically, the
- 7:57:52selection, I want to show select all.
- 7:57:55So, I'm going to enable that. And then
- 7:57:58in the slicer itself, clicking the three
- 7:58:01dots, I'm going to enable search. That
- 7:58:03way whenever they drop down here, they
- 7:58:05can actually have be able to search for
- 7:58:06something like data analyst. They can
- 7:58:08select it, it'll filter. All right, undo
- 7:58:11it. The last thing is I like to cue
- 7:58:13people in. So I'm just going to say
- 7:58:15select job title. Okay, looking good.
- 7:58:18Let's actually copy this. And in this
- 7:58:21one, instead of doing select job title,
- 7:58:23we're going to drag in job country. And
- 7:58:26we'll rename this to select country.
- 7:58:28Now, I do want an easy way to clear the
- 7:58:30slicers. So, I am going to insert a
- 7:58:33button. Specifically, we're going to
- 7:58:34insert a clear all slicers button. And
- 7:58:37I'm going to put it over here to the
- 7:58:38right hand side. Under the button
- 7:58:40option, going to style. I'm just going
- 7:58:42to say instead of clear all slicers,
- 7:58:43only two. I'm just say clear slicers.
- 7:58:45Also, make that text a little bit
- 7:58:47bigger. And I'm going to enable the
- 7:58:49shadow to make it look a little bit more
- 7:58:51standout so people understand it is a
- 7:58:53button. I do have to format things a
- 7:58:55little bit to make a little bit more
- 7:58:56space for it. All right. Looking good.
- 7:58:59I'm liking this layout here. It's very
- 7:59:02simple. We got two visuals underneath.
- 7:59:04We got our main KPIs up at the top and
- 7:59:07then we have the appropriate slicers as
- 7:59:10well.
- 7:59:13All right. Now that we have the rough
- 7:59:14draft out of the way, there is some
- 7:59:17refinement I want to get into with this.
- 7:59:20Specifically, as I mentioned in the
- 7:59:21beginning, for these skills, I want to
- 7:59:24look at it from two perspectives. Job
- 7:59:26count and percentage. And then for the
- 7:59:28salary, I want to look at it from yearly
- 7:59:30and also hourly. I want to be able to
- 7:59:32switch between them. We need to do
- 7:59:33parameters for this. Let's get into the
- 7:59:35skill one first. Specifically, we want a
- 7:59:38percentage. What do I mean by
- 7:59:39percentage? Well, in my app, I don't
- 7:59:41present counts of a particular skill.
- 7:59:45Instead, what a percent is the
- 7:59:47percentage or likelihood that it's going
- 7:59:49to be in a job posting. In this case,
- 7:59:51Python is in 55% of all job postings.
- 7:59:55Whenever I filter for something like
- 7:59:56data analyst in the United States, it
- 7:59:58tells me something like PowerBI is in
- 8:00:00almost 17% of job postings. So, we need
- 8:00:03to create a measure inside of PowerBI to
- 8:00:07do this skill percentage before we even
- 8:00:09create that parameter. So, I'm going to
- 8:00:10rightclick our measures and select
- 8:00:13create new measure. In this, we're going
- 8:00:15to create a new one called job percent.
- 8:00:17Now, in order to get this percentage, we
- 8:00:19have to take well, we have to divide. We
- 8:00:21have to have a numerator and a
- 8:00:22denominator. So we're going to use the
- 8:00:24divide function for this. So the
- 8:00:26numerator is the count of a particular
- 8:00:30skill that has been filtered down into
- 8:00:33the correct context. So in the case of
- 8:00:35something like Python that's below here,
- 8:00:38that is the count of Python, which is
- 8:00:40244,000. Anyway, that's done by the
- 8:00:42measure job count. So that's pretty
- 8:00:45easy, right? We just put in job count.
- 8:00:47But now the denominator,
- 8:00:51this needs to be basically this job
- 8:00:55count right here, this 479,000.
- 8:00:59But I can't just put something in like
- 8:01:02job count, right? Um cuz this isn't
- 8:01:05going to show the right context. I'm
- 8:01:06just doing this for demonstration
- 8:01:07purposes. I'm dividing job count by job
- 8:01:09count. And then inside of here, I'm
- 8:01:12going to drag job percentage in here and
- 8:01:14take off job count. Anyway, every single
- 8:01:17one of them, right, is 100% not what we
- 8:01:20want. So, going to job percentage just
- 8:01:22to show what we do need in here. We need
- 8:01:24it to be basically that 479,000 of
- 8:01:27479,000. We're not going to keep this
- 8:01:29cuz we could potentially put filters on
- 8:01:31it. I'm going to show you why. Anyway,
- 8:01:32pressing uh enter to do this. See, this
- 8:01:35looks very similar to what we saw
- 8:01:36previously. And I know this is correct
- 8:01:39because it has the same around 51%.
- 8:01:43That's what I expected to be see for
- 8:01:44Python and SQL. Right now, it's not in
- 8:01:46the right format. So, I'm actually going
- 8:01:48to select it. I'm going to change this
- 8:01:49to a percentage with zero decimal
- 8:01:51places. Anyway, I digress. So, with this
- 8:01:55job percentage, how are we going to get
- 8:01:57this correct value in here? Because
- 8:02:00right now, if I were to now filter for
- 8:02:02something like data analyst and then go
- 8:02:04down, right, this number has now changed
- 8:02:07to 113,000. So, I can't hardcode it in.
- 8:02:10These percentages are not correct.
- 8:02:11they're entirely too low. We need to
- 8:02:14basically use a certain function that
- 8:02:16will remove that query context. This is
- 8:02:20why it's important that you know between
- 8:02:22row query and filter context. Going into
- 8:02:24job percent, you know, we're probably
- 8:02:26going to use something like the
- 8:02:27calculate function for this. And for the
- 8:02:29expression, we're still going to use job
- 8:02:31count, but we want to do something in
- 8:02:34order to remove this skill context
- 8:02:37filter or this skill query context
- 8:02:40filter that's on there. Well, lucky for
- 8:02:42us, there's a function for that called
- 8:02:44all selected. This removes the filters
- 8:02:47from columns and rows in the current
- 8:02:49query. In our case, those column and
- 8:02:50rows would be the visualization.
- 8:02:53And with this, it retains all other
- 8:02:55context filters or explicit filters. So,
- 8:02:58we need to specify what filters we don't
- 8:03:01want it to actually filter down for. And
- 8:03:04specifically, we don't want to filter
- 8:03:05down for this skills. So, I'm going to
- 8:03:08put in all selected. And we can put in a
- 8:03:11table name or column. We need to put the
- 8:03:13name of the column or name of the table
- 8:03:14where the skills are. So, skill dim. All
- 8:03:17right. Now, pressing enter. Boom. This
- 8:03:21data analyst actually updated and it's
- 8:03:23where I suspect, right? PowerBI here is
- 8:03:26up to 23%. Notice this is going to be
- 8:03:29different from our dashboard or data
- 8:03:30nerd.te because data nerd.tech has
- 8:03:32multiple different years. We're only
- 8:03:34doing 2024 within this dashboard, but
- 8:03:36the percentages are very similar.
- 8:03:38Anyway, if I wanted to doublech check
- 8:03:40this, I could inside this visualization
- 8:03:43in the tool tip drag in that job count
- 8:03:45and then I could double check the math
- 8:03:46by saying that hey, is 26500
- 8:03:50/ 113 23%. It is. I did the math just in
- 8:03:54case you don't believe me. All right,
- 8:03:56sweet. Let's go ahead and remove this
- 8:03:57data analyst filter. And let's now since
- 8:03:59we have we have our job percentage and
- 8:04:01job count for this one and our median,
- 8:04:03yearly, and median hourly, we need to
- 8:04:05create our parameters for this because
- 8:04:07we're going to have slicers or basically
- 8:04:10tile buttons below this to select what
- 8:04:13kind of view we want to see with each
- 8:04:14within each of these. So, inside
- 8:04:16modeling, I'm going to go to new
- 8:04:18parameters and we're going to do fields.
- 8:04:20And for this, we're going to say select
- 8:04:22skill measure. And I'm going to drag in
- 8:04:24job percent first because I feel that's
- 8:04:26more important. And then they can also,
- 8:04:27if they want to switch to job count, and
- 8:04:29I'm going to go ahead and select create
- 8:04:31with add slicer to this page. I'm going
- 8:04:33to drag it down to this bottom portion
- 8:04:35right here. I'm going to change this
- 8:04:37slicer though. I don't want it to be a
- 8:04:39vertical list. I want it to be actual
- 8:04:40tile buttons. And I don't like the title
- 8:04:43on there. I don't want it to have a
- 8:04:45title on there. So, I'm actually going
- 8:04:46to click on here, just press space, and
- 8:04:48then press enter to remove it. And then
- 8:04:50reformat this other visual to be right
- 8:04:53above this. Okay. So, now I can select
- 8:04:55things like job percent or job count.
- 8:04:58And it's doing nothing because it's not
- 8:04:59in our visual. So, with our visual
- 8:05:01selected, I'm go under select scale
- 8:05:04measure, and I'm going to drag that into
- 8:05:05the X-axis and remove this job percent.
- 8:05:08Okay. So, now I can switch between job
- 8:05:11percent and job count. and the
- 8:05:14proportions of these should remain the
- 8:05:16same. So that's how you can also double
- 8:05:18check that your math is right. Anyway,
- 8:05:21let's do the same thing now for this
- 8:05:22graph where we want to create a
- 8:05:24parameter for hourly and yearly salary.
- 8:05:26So I'm going to create a new fields
- 8:05:27parameter and I'll say select job
- 8:05:30measure. I want yearly salary first
- 8:05:32followed by hourly. We're going to go
- 8:05:34create this. It's going to add in a
- 8:05:36slicer. Similarly, I'm going to remove
- 8:05:38the title by selecting all of this in
- 8:05:40the fields well pressing space and then
- 8:05:42enter. And then under format your visual
- 8:05:44under slicer settings. I'm going to
- 8:05:46change this to tile. Once again, this
- 8:05:48isn't going to do anything till we
- 8:05:49actually add it into our visualization
- 8:05:51itself. Just going to drag this in here
- 8:05:53to the x-axis and get rid of that median
- 8:05:55yearly salary. And now we can select
- 8:05:58between the two. Pretty neat. Also, I'm
- 8:06:01noticing our median hourly salary is not
- 8:06:04formatted correctly as currency. And
- 8:06:07we're just going to keep it simple at
- 8:06:08zero decimal places.
- 8:06:11All
- 8:06:12right, this is looking pretty sweet. I'm
- 8:06:15liking it. But I do want to do some
- 8:06:18elements of improving the background to
- 8:06:22show how this actually all works
- 8:06:24together cuz right now it's really
- 8:06:26unclear that the parameters work with
- 8:06:28these graphs above here. So we can build
- 8:06:30in v visual cues in the background that
- 8:06:32they are associated with each other
- 8:06:33along with these KPIs as well. We're
- 8:06:36going to follow a similar similar
- 8:06:37approach that we did in the last
- 8:06:39project. And I'm just going to use these
- 8:06:41rounded rectangles that we're going to
- 8:06:42end up putting in the back. First thing
- 8:06:45I'm going to do is actually put these
- 8:06:46around the appropriate KPIs. So, we'll
- 8:06:49do each of these. But let's actually I'm
- 8:06:51getting ahead of myself. We need to
- 8:06:52adjust the coloring first. I don't want
- 8:06:54this blue color. So, under the format
- 8:06:56shape, I'm going to the style. And then
- 8:06:59for the color first, I want to match the
- 8:07:01background exactly. And I'm actually
- 8:07:04fine. I can't match the background
- 8:07:05exactly, but what I want is I want it to
- 8:07:07be slightly darker. So, I went with
- 8:07:10black 20% lighter. And I don't know if
- 8:07:12you can see, but there's like this blue
- 8:07:14line around here. Specifically, those
- 8:07:16borders on. And for this one, I'm going
- 8:07:18to make it even slightly darker. To make
- 8:07:21it stand out and pop and make it pop
- 8:07:24even more, I'm going to turn on shadows.
- 8:07:27All right. So, this is good enough. I'm
- 8:07:28going to now copy this and then paste
- 8:07:30this for this KPI as well. And then I'm
- 8:07:34going to create two more for these
- 8:07:36visualizations. Now, with these
- 8:07:38visualizations, it's getting these extra
- 8:07:40rounded curves. I don't really like
- 8:07:42that. So, I'm going to go under shape
- 8:07:44and the rounded corners. I'm going to
- 8:07:45just going to bring down until it
- 8:07:47matches the rounded shape of that above
- 8:07:49it. It's around 10%. All right, looks
- 8:07:51good. Going to copy this one. Going to
- 8:07:52paste it. Not bad. Like last time, I
- 8:07:56want to group all these and put them in
- 8:07:57the back. So, we need to go into that
- 8:07:59view, specifically showing the
- 8:08:01selection. I'm going minimize this. So,
- 8:08:04this is showing all of our different
- 8:08:05shapes. I'm going to select all of our
- 8:08:07appropriate shapes by holding control,
- 8:08:09selecting them all. Now, they're
- 8:08:11selected. Rightclick them, go to group,
- 8:08:14name this group background, and then put
- 8:08:16it all the way in the back. But we can't
- 8:08:18see it, right? So, we need to remove for
- 8:08:21each one of these visuals, we need to
- 8:08:23remove their backgrounds or make it
- 8:08:25transparent. So, I'm going to turn off
- 8:08:26the selection pane. We're done with that
- 8:08:28now. And get back into visualizations.
- 8:08:30We're going to go into these visuals and
- 8:08:32specifically under the format your
- 8:08:33visual under general under effects,
- 8:08:36we're going to remove the background.
- 8:08:38And then for these cards is a little bit
- 8:08:39more complex. You actually have to go
- 8:08:41into cards as well on top of what you
- 8:08:43just did and then select background and
- 8:08:46turn this off. Anyway, now need to
- 8:08:48adjust these. Well, at least not the KPI
- 8:08:51cards. Those are fitting just fine
- 8:08:52inside of there. But we need to adjust
- 8:08:54now these visuals to make sure that
- 8:08:55they're fitting inside of these
- 8:08:56appropriate blocks. All right, not
- 8:08:59looking bad. This is now finalized. The
- 8:09:02next thing that I'd want to do is
- 8:09:04hopefully you've been saving this along
- 8:09:05the way. If you haven't, now is a good
- 8:09:07time to save it. But I'm going to
- 8:09:08actually save this with a new title so I
- 8:09:10can get rid of all these different
- 8:09:12pages. And then we can upload it to the
- 8:09:14PowerBI service if you happen to want to
- 8:09:16do that option. Not required by any
- 8:09:18means. I'm going to call this data jobs
- 8:09:19dashboard 2.0 and then go through and
- 8:09:22remove all these extra pages in here.
- 8:09:24Okay, everything's in here that I want.
- 8:09:26I'm going to save it again. And then
- 8:09:28under the home tag, I can go into
- 8:09:30publish, select the dashboard I want to
- 8:09:33go to, and click select and upload it.
- 8:09:36So, here's mine uploaded onto the
- 8:09:38PowerBI service. I can go through if I
- 8:09:40want to select things like data analyst
- 8:09:43in the United States and bam. This thing
- 8:09:46is good. I'm liking it. Remember if you
- 8:09:49did take this option or do this option
- 8:09:51you can go to the option of under file
- 8:09:53embedded report and then publish to web
- 8:09:56and then you'll get this link which you
- 8:09:59can actually view mine at the link below
- 8:10:02and this is accessible from any URL and
- 8:10:05completely interactive like we showed
- 8:10:07previously. Anyway, now I think we have
- 8:10:09the dashboard in a much better manner.
- 8:10:12This meets all the things that I wanted
- 8:10:14out of this specifically. I wanted to
- 8:10:16have insights on the skills. what were
- 8:10:18the top skills and then also with the
- 8:10:20salaries, what were basically the
- 8:10:22highest paying jobs hourly and also
- 8:10:24yearly. And for cases where we want to
- 8:10:26filter our data down, such as looking at
- 8:10:28something like the data analyst, we can
- 8:10:30get even more insights and value out of
- 8:10:32things like the KPIs above here.
- 8:10:35Overall, I'm pretty in love with this
- 8:10:37dashboard. Now, it's your turn to go
- 8:10:39through and finalize your project. Once
- 8:10:42again, as a reminder, you're not
- 8:10:43required to follow my project exactly.
- 8:10:47feel free to adapt it to your need.
- 8:10:49Anyway, in the next lesson, the final
- 8:10:52lesson, we're going to get into how I
- 8:10:54would go about sharing this dashboard
- 8:10:56along with that previous dashboard that
- 8:10:58we created halfway through this course.
- 8:11:00With that, see you in the next one.
- 8:11:06All right, first of all, congratulations
- 8:11:09on wrapping up the second project and
- 8:11:11now, if you will, this entire course.
- 8:11:14It's been nothing short of your hard
- 8:11:16work. In this video, we're going to be
- 8:11:18going through how to actually better
- 8:11:20share both of those different portfolio
- 8:11:23projects that we put together. But for
- 8:11:25our most recent dashboard, we still need
- 8:11:27to go through and create a readme to
- 8:11:30document what we all did. And as we're
- 8:11:33going to find out, we need to reorganize
- 8:11:35our project. Anyway, what do I mean by
- 8:11:37that? Let's jump in.
- 8:11:41So, here I am inside of VS Code and we
- 8:11:44haven't changed anything since the last
- 8:11:45left off. But specifically inside of our
- 8:11:49PowerBI dashboards, we have three
- 8:11:51different objects. Images folder, the
- 8:11:53data jobs dashboard or actual PowerBI
- 8:11:55file, and then our readme. I can even
- 8:11:57pull it up on VS Code just to show that
- 8:12:00okay it is these three things and that
- 8:12:02readme is getting put on that first page
- 8:12:05and that's for this project or this repo
- 8:12:08that we have of PowerBI dashboards but I
- 8:12:11want all of our projects in here or our
- 8:12:14la or our current two projects in here.
- 8:12:16So we need to restructure this in a way
- 8:12:18to accomplish that. So back inside of VS
- 8:12:21Code, what I'm going to do is I'm going
- 8:12:22to create a folder for these projects
- 8:12:25right here. I'm going to call it data
- 8:12:27jobs v1. Press enter. Anyway, I'm going
- 8:12:30to grab these both these items and put
- 8:12:33them inside of here. Now, with this
- 8:12:35restructuring,
- 8:12:37unfortunately, we don't have something
- 8:12:38to deh show on the front of our repo.
- 8:12:42But now, with this restructuring, it's
- 8:12:43going to affect how our repo looks.
- 8:12:46Specifically, I'm just going to show
- 8:12:47this for demo. You don't need to do
- 8:12:48this. I'm going to push these changes up
- 8:12:50to GitHub with this commit of move
- 8:12:53folders commit. and then I'm going to
- 8:12:55sync the changes. Now, refreshing this
- 8:12:58inside of GitHub, what we're going to
- 8:13:00notice is, okay, we got our folder, but
- 8:13:02now we need a readme. So, what we're
- 8:13:04going to do is we're going to create a
- 8:13:05readme for the top of the repository and
- 8:13:09then direct people to either data jobs
- 8:13:12v1 and data jobs v2. And if you happen
- 8:13:16to make other projects in PowerBI, you
- 8:13:18can just add them straight to this. So,
- 8:13:20super convenient. So, back in VS Code
- 8:13:22under explore, I'm going to go ahead and
- 8:13:24add a new file. And this one is going to
- 8:13:26be called readme.md. Now, these readmes,
- 8:13:29right, they need to be named this
- 8:13:30specifically because that's how GitHub
- 8:13:32knows to pick it up and display it. I'm
- 8:13:33going to close this side pane and also
- 8:13:35zoom out a little bit. I'm pressing
- 8:13:37control and then minus. All right, so
- 8:13:39let's go ahead and build out this front
- 8:13:41page. And we're going to keep it really
- 8:13:42simple. I'm also going to be opening up
- 8:13:44this side pane so we can see as we work
- 8:13:45as we go. I started off simple with my
- 8:13:48PowerBI dashboard portfolio. give a
- 8:13:50little short intro into what I'm doing
- 8:13:52here. And then underneath this, I have a
- 8:13:53featured dashboard section, which we can
- 8:13:55now list all of our different
- 8:13:57dashboards. I'm going start by first
- 8:13:59putting in that data jobs dashboard,
- 8:14:01this V1. We're going to just put an
- 8:14:03image in real quick. And we're going to
- 8:14:05use that same image we've been using
- 8:14:06that we have in our image folders. And
- 8:14:08for this I start by giving the
- 8:14:09hypertext. So an exclamation point and
- 8:14:11then inside brackets a brackets the
- 8:14:13actual alt text and then in parentheses
- 8:14:17the link to that specifically we want to
- 8:14:19go in the images folder and we want that
- 8:14:21project one page one. Now for me I'm
- 8:14:24also going to list right underneath this
- 8:14:27the link to this so that way if they
- 8:14:30wanted to they can go to my interactive
- 8:14:32dashboard that's hosted on the PowerBI
- 8:14:35service. Now, the next section that I'm
- 8:14:37going to add is optional, but highly
- 8:14:39recommended. I'm going to capture in
- 8:14:41bullet point, very succinctly, what are
- 8:14:44all the different PowerBI skills that I
- 8:14:47used in order to build this
- 8:14:49visualization. And then right under
- 8:14:50this, I want to link them to my readme
- 8:14:54in the project one folder. So, they
- 8:14:57start checking out this. So, we're going
- 8:14:58to create a link. In square brackets,
- 8:15:01I'm going to put what I want for the
- 8:15:02text. And then from there, I'm going to
- 8:15:04put in the link. So whenever they go to
- 8:15:06click on it, it will pop up and then
- 8:15:07they can go through that readme that we
- 8:15:09previously had. One note, I just put the
- 8:15:12skills that we previously had generated
- 8:15:14into CHBT, had it condensed down, and
- 8:15:16that's how I got this list right here
- 8:15:17for our new readme. So we have the core
- 8:15:20features built out for this. I'm liking
- 8:15:23what's going on here. I'm going to now
- 8:15:25save this and then close out of it all.
- 8:15:28Go into source control and I'm going to
- 8:15:30push this up to my readme. Feel free to
- 8:15:33actually you do this now too as well. I
- 8:15:35gave it the commit message of update
- 8:15:37source readme and then I'm just going to
- 8:15:39sync the changes. And now inside of here
- 8:15:41I'm going to click refresh for GitHub.
- 8:15:44And we have this now to where it shows
- 8:15:47hey there's our feature dashboards.
- 8:15:48There's our first dashboard. We can view
- 8:15:50it on PowerBI service. Oh, I want to
- 8:15:52view the full project one details. I can
- 8:15:54click on it and it navigates me to this
- 8:15:56page here where I can now see all of
- 8:15:59this.
- 8:16:03Now that we got that out of the way for
- 8:16:04the restructuring, let's actually get
- 8:16:06into building out our readme for V2 or
- 8:16:10the most recent one that we just built.
- 8:16:12So, I'm going to create a new folder,
- 8:16:14call it data jobs v2. Inside of here,
- 8:16:17I'm going to add a readme cuz we want a
- 8:16:19readme for this one. And then the last
- 8:16:21thing we do is need to wherever you save
- 8:16:23data jobs dashboard your 2.0, you need
- 8:16:26to just go ahead and drag it in. But
- 8:16:28apparently that doesn't work. So
- 8:16:30navigate where it is in file explorer
- 8:16:32and then open v2. Then I'm going to go
- 8:16:34ahead and just copy this and then paste
- 8:16:37it right into here using crl +v. Now for
- 8:16:40the readme for project 2, we're going to
- 8:16:42follow a very similar structure to that
- 8:16:45of v1. So I'm going to just go ahead and
- 8:16:47copy this bad boy. then go into here and
- 8:16:50paste it in. ControlV and so I don't get
- 8:16:53confused, I'm g close out of the other
- 8:16:54one. Gonna minimize the explorer so I
- 8:16:56can see better and then open this view.
- 8:16:59All right, so this is data jobs
- 8:17:00dashboard and it is V2. We need to get
- 8:17:04first and update an image. For this,
- 8:17:06we're just going to use that snipp tool
- 8:17:07like we learned to use previously, which
- 8:17:09all we have to do is press Windows
- 8:17:11shifts. So I'm going to snap a shot of
- 8:17:14this bad boy. Go to markup and share.
- 8:17:18And specifically, I want to save this.
- 8:17:21And I'm going to save this in our images
- 8:17:22folders. Project 2, page one. Save it.
- 8:17:25Now, inside of here, all I need to do is
- 8:17:26just update that this is actually
- 8:17:28project 2_.
- 8:17:30Bam. It's appearing right here. I've
- 8:17:32also updated my link for this that we
- 8:17:34created previously, which I can just
- 8:17:36click on to verify that it is in fact
- 8:17:39working. It's up there. It's good to go.
- 8:17:41Next up, I'm going to update the
- 8:17:43introduction to make it more relative
- 8:17:45that we upgrade the last dashboard. And
- 8:17:47I just highlighted this. This project
- 8:17:49offers a streamlined single page uh page
- 8:17:52interface to quickly explore crucial
- 8:17:53market trends. Now, scrolling on down to
- 8:17:56the skills showcased. These skills were
- 8:17:59really dealing with the first half of
- 8:18:01the course, so they need to be updated
- 8:18:02for the second half of the course. So,
- 8:18:04I'm going to go ahead and delete them
- 8:18:05and start from scratch. With this one, I
- 8:18:07focused on not only dashboard design,
- 8:18:09but how much we use Power Query, how we
- 8:18:11use data modeling and also DAX. And then
- 8:18:14I did highlight again the visualizations
- 8:18:17we used of car charts, cards, tables,
- 8:18:19and whatnot. And then finally,
- 8:18:21highlighting those interactive features
- 8:18:23like slicers and button, buttons, and
- 8:18:24books. For this bottom portion, we don't
- 8:18:27have uh two pages. So, I'm actually
- 8:18:29going to get rid of all this portion
- 8:18:30regarding the second portion. I'll
- 8:18:33update our image right here to be from
- 8:18:36project 2. And I don't really need this
- 8:18:38title as well. And we're going to get
- 8:18:40rid of this text as well. So above the
- 8:18:43image, I want to call out that this is
- 8:18:44the second iteration of this
- 8:18:46consolidating the dashboard into a
- 8:18:47single focus page. And then underneath
- 8:18:50this, I call out how we've basically
- 8:18:52made this more concise and we focus it
- 8:18:54on key KPIs like job count, skills per
- 8:18:57job, median, yearly, hourly, salaries.
- 8:18:59Um, the last thing to wrap up is the
- 8:19:01conclusion. And for this, I just
- 8:19:04highlight once again that this is a V2
- 8:19:06and that the purpose of this was really
- 8:19:08streamline a lot of the analytics and
- 8:19:10stuff that we did in V1 in order to show
- 8:19:12what is most important to job seekers,
- 8:19:15job transitioners, and job swappers. All
- 8:19:18right, this is looking good. I'm going
- 8:19:19to go ahead and save this. The last
- 8:19:21thing that we need to do is now just
- 8:19:23update that read me on the main page.
- 8:19:26So, I'm going to close out of these that
- 8:19:27way it doesn't look as confusing. the
- 8:19:29read me on the main page. And for this,
- 8:19:31we need to add in that V2 down here,
- 8:19:34right? So, we have V1 for our first
- 8:19:36dashboard. We need to highlight V2
- 8:19:38underneath this. So, I've put a title in
- 8:19:40here for this one for data jobs
- 8:19:42dashboard V2. And the first thing I want
- 8:19:44to do is actually show an image. So, I
- 8:19:46start by finding that alt text and then
- 8:19:47in parenthesis, the actual hyperlink. I
- 8:19:50also like above want to have it to where
- 8:19:53it goes to the PowerBI service. So I'll
- 8:19:56put in a hyperlink to the PowerBI
- 8:19:59service. Now we're going to do a similar
- 8:20:00format to what we did up here in that
- 8:20:03we're going to talk about the key skills
- 8:20:05utilized. So underneath this we're going
- 8:20:07to be putting that and with this feel
- 8:20:10free to have just chat GPT summarize
- 8:20:11what we wrote last in order to capture
- 8:20:14those key areas we want to talk about.
- 8:20:16And then underneath this remember we
- 8:20:17want them to go to that read me that we
- 8:20:19just created for project 2. So, I'm
- 8:20:22going to go ahead and put a link in here
- 8:20:23where they can v uh view the full
- 8:20:25project. Anytime you create any link,
- 8:20:27you should always verify that it works
- 8:20:29and it directs me right to it. Good to
- 8:20:31go. Now, at the bottom, here's a little
- 8:20:33optional area that I'd recommend adding
- 8:20:35for this front page of here. And that's
- 8:20:38a about section about this portfolio.
- 8:20:40And this just explains that every
- 8:20:42project heads read me that you can get
- 8:20:44even more insights about it. And then
- 8:20:47they direct you to the different PowerBI
- 8:20:49files. Okay, this is good to go. Just do
- 8:20:52a once over for this. I'm liking it.
- 8:20:54Let's actually get this onto GitHub. So,
- 8:20:57I'm going make a message of project 2
- 8:20:58complete. Do commit and then from there
- 8:21:01sync the changes. Navigating back to the
- 8:21:04source folder. Let's see if it's
- 8:21:06working. Okay, looks like we have our V2
- 8:21:09in there. We have our main page showing
- 8:21:12our first project and then the second
- 8:21:14project as well. And make sure that the
- 8:21:17links are working. And I can navigate to
- 8:21:19the project 2 readme which has all the
- 8:21:22different information in here for it.
- 8:21:24It's looking really good.
- 8:21:29So no work ever happened unless shared
- 8:21:31on LinkedIn. We're going to go through
- 8:21:33the same steps that we did for project
- 8:21:34one to share it. The first thing is
- 8:21:36adding a project. Here under our project
- 8:21:38section, we're going to click add. So I
- 8:21:40added this name of data job skill
- 8:21:42dashboard 2. I put in these skills which
- 8:21:45are different from our last one, right?
- 8:21:46We have PowerBI but also now DAX Power
- 8:21:48Query data modeling and add this one of
- 8:21:51KPI dashboards. For the link for this, I
- 8:21:53would direct them to the readme of V2.
- 8:21:56And so I' copy this one here. And then
- 8:21:58under add media, I'm going to add in a
- 8:22:00link. Paste in that value and then click
- 8:22:03apply. One quick note, if I navigate
- 8:22:05back to that source folder, right, this
- 8:22:08is where we linked for project one to go
- 8:22:10to, which it may be okay, but if you're
- 8:22:12a perfectionist, feel free to change
- 8:22:15that to this area right here for them to
- 8:22:17actually navigate into and see project
- 8:22:20one. After this, put in a start and end
- 8:22:22date. And you can go ahead and save
- 8:22:24this. Now, for those that supported the
- 8:22:26course, as soon as you complete the end
- 8:22:29of course survey, I'll automatically
- 8:22:31send you a certificate of completion.
- 8:22:34And you know what we got to do with this
- 8:22:36bad boy? We also got to get this onto
- 8:22:38LinkedIn. On your profile, under
- 8:22:40licenses and certifications, I'm going
- 8:22:42to go ahead and click add. For the name,
- 8:22:44we'll put in PowerBI for data analytics.
- 8:22:46List me as the issuing organization.
- 8:22:48Update the issue date. There is no
- 8:22:51expiration date with this, so you can
- 8:22:52leave that blank. The credential ID is
- 8:22:55located on the certificate itself and
- 8:22:58then you'll also get emailed with this
- 8:22:59the actual URL to the certificate so you
- 8:23:01can actually display it that you can use
- 8:23:03the as the credential URL update those
- 8:23:05skills. I just listed the same ones that
- 8:23:07we covered in the project too because I
- 8:23:09feel like those were more robust and
- 8:23:11then from there you can add any media
- 8:23:12images or whatnot. I would just
- 8:23:14recommend using that GitHub profile,
- 8:23:16specifically the main PowerBI dashboard
- 8:23:19here that allows them to navigate to all
- 8:23:22the different files we did for this. So,
- 8:23:23I'm just going to copy this and then add
- 8:23:26in this link here. Looking good. All
- 8:23:29right. All we got to do now, click save.
- 8:23:31Last thing we got to do is actually post
- 8:23:33about it because it's great that you
- 8:23:34updated your profile, but you actually
- 8:23:36need to let others know what you did in
- 8:23:38it. Just make it simple. I've put an
- 8:23:40intro of, hey, I just completed this
- 8:23:42course. gave a quick insight of what we
- 8:23:44built and the skills we use for this.
- 8:23:47Feel free to tag myself and also Kelly
- 8:23:49in this. We love seeing what you
- 8:23:52actually build with this. And then
- 8:23:53finally, at the end, you can list the
- 8:23:55URL to the project. Also, some people
- 8:23:56just like to put it in the comment
- 8:23:58section because apparently it works
- 8:23:59better with LinkedIn algorithm. I
- 8:24:01included a photo, too, to just make it a
- 8:24:03little bit more engaging. And go ahead,
- 8:24:05post. So, once again, congratulations
- 8:24:08for wrapping up this course. It's been
- 8:24:10nothing short of your hard work. One
- 8:24:13last note, it's not too late for you to
- 8:24:15get that certificate of completion. All
- 8:24:18you got to do is support the course and
- 8:24:19then complete the end of course survey.
- 8:24:20Tell me how I did during this and then
- 8:24:22I'll email it right to you. All right,
- 8:24:24if you got value out of this video,
- 8:24:25smash that like button. And with that,
- 8:24:27I'll see you in the next one.
About this transcript
This page contains the full transcript of Power BI for Data Analytics - Full Course for Beginners by Luke Barousse, generated from the public captions YouTube serves with the video. The transcript has 98,210 words across 13,515 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.