in this video we're going to take a look at power bi show you how to bring in some data
do some light transformations on that data and then also walk through the basic functionality of
using this visualizations tab with the fields and formatting options this is assuming you already
have power bi installed and you're familiar with it if not at a high level power bi is essentially
microsoft's primary data visualization tool that you can use for reporting and analytics
so to start we will go to the get data option here and in our case we will use sql server
but as you can see there's several different options i have a local server here that i've
gone over in other videos but if you have your own server you can connect here i'm going to
do the import connectivity mode as opposed to direct query this is essentially going to
load a copy of the data that you select into your power bi workbook as opposed to direct
query which would continuously query whatever server and database that you choose every time
to get the data here we'll need to connect in my case i'll do a database connection but you could
do your current windows user or if you have a microsoft account you could do that as well
next we'll see this navigator window pop up and here's where you can pick from your different
databases within the server that you connected to in our case we will look at this adventure works
data warehouse we have a couple views here that we can work with and i'll just select a few of them
we'll select load here now that what this is doing is loading all those different tables that you
selected to your workbook and here we can see over in the fields everything that we just selected
is now here so we have all these different tables and we can see all the columns within it
next let's take a look at how we would actually edit this data and maybe do some
light transformations there are two ways that you can get to this you could right click on any of
these here and say edit query or you can go to this panel up here and say edit queries as well
so let's go here and this is going to open up a power query editor which if you've used this in
excel it looks very similar it's essentially the same functionality and here's where it provides
you with all these different options to transform this data you could add columns rename things
you know whatever you want so what we'll do is add a couple transformations to a couple light
edits here just to show you how it works so first let's let's rename the actual model itself we'll
call this product so it's a little more user friendly to read we can click on any of the
other models here as well so we'll do customer we can rename this and here let's add a custom column
let's show how we would do that you can do add column and custom column obviously there's a
couple other options here but in this video we're just going to do some basic some basic ones this
full name column already exists but we're going to essentially remake it just to show you how
this functionality works for a custom column so i'll call this customer name and in here it's
a formula very similar to anything else that you would do maybe in excel or other microsoft tools
it's similar types of functions so what we'll do is just concatenate the first and last name
again this is just to show you how to make a custom column here in power bi so similar to excel
we'll do first name i just double click that and i'll add a space another ampersand and last name
so no syntax errors have been detected and let's click ok now we can see this was added as a step
here and it automatically populates a new column at the end of the table based on that logic
now we can also customize this we could rename this if we want and give it something more useful
rename and let's call this add customer name next another common one might be a conditional
column so let's try to add this one right here and what we can do in this case we'll create a
condition that looks at the occupation and we'll say if the occupation is professional then yes
if not no we'll call this is professional and the way this works is pretty straightforward you just
follow the instructions here if occupation equals in this case value professional then
yes otherwise no and you could add more conditions if you wanted to let's click ok
and now we can see this added this new column as well let's rename this one as well we'll call this
add is professional okay so those are just some basic ways of adding new columns there's several
other ways you can do it but those are the most straightforward ones and the last thing i'll show
you in this screen is what the actual underlying code looks like that power bi puts together
to create these because it's looking at these different steps from your source to then adding
on each of these transformations in in its own way and the way you can see that is if you click on
any of these queries any of these models here right click and go to advanced editor you can
see this here and this is what's called m formula language it's i think it's unique to power bi
but essentially it looks like this it has this let and this in statement you can see the source
the name of the view that was originally there and then the name of the transformations that
we just did and this is where having that renamed to something more valuable comes into play because
it'll make this a little bit easier to read if you need to use it let's finish this up by naming
these a little more of a user-friendly way and now we're ready to roll so i will close and apply
now that we have this data we want to go ahead and actually use it and make something on this canvas
in power bi just a quick lay of the land here we have this visualizations tab here and this
is where you can pick the different types that you want there's a whole bunch there's also
a marketplace that you can use you can import a custom one from a file and you just start dragging
your information here a lot of it's pretty intuitive to get started so for example
we could say customer name if we were to just drop drop this here it would immediately create
a pretty basic just table that's the default it just defaults to a table and gives you a list
of all these now if we click on this visually we can see values and here you can change filtering
just filter it by a specific person and it all shows over here you can do it on the page level
on the visual level or in the entire report report being multiple pages if you have them the second
one here is formatting and this is where you can get pretty detailed in terms of the styling of an
individual object or the entire page and and keep it consistent with maybe some color schemes for
your company or or whatever you're working on here you can set the position so if you actually move
this you can see it's giving specific locations and you could hard code this if you wanted to
get it exactly where you want styling this is for the table itself for this specific type of visual
so we could say minimal bold header again you can customize everything pretty granularly with this
you can change the font colors the background colors if there's an outline you know say none
change the values so it gets pretty specific title we can add a title at the top here so
let's just say our customer names and you can see it showed up here showed up up here now
make it a little bigger if we wanted pool tips so a ton of different options here
and the same applies for the actual page itself so if we were to just click off of
this and click on the actual blank page itself and go to the same format option here we can
actually change the whole page so for example we can give the page a name here and call this
customer summary and we can see that change down here the page size it comes by default with some
proportion sizes but you could customize it as well let's say you needed it to be
a lot wider or a specific height you could do that here background so you could change this
here and then as we change this we can see the background color begin to change
so we'll let's make this a light gray i'll put in a light gray color wallpaper this would change
these colors out here so if we let's just say red you can see out here that color changes i'll turn
this off for now to clean this up we'll we'll come in here let's change the background here to
white and and we can make the values a little bigger it looks a little small the column header
will make this a little bigger as well let's also add a border to get rid of the title so
let's add something else to this table right now it's just a list of names let's give it a value
let's say we want to know order quantities by person now we can see here it's immediately
putting it next to that that person's name so adding a little more context and all this stuff
again is customizable if you wanted next we could add another graphic here let's let's add a some
column chart get some get some bars in here let's turn this into something that can reflect maybe
total sales of of these customers so we can see here this visual has a couple different
options compared to the other one and each one that we pick will have something unique to it
in this case let's make some sort of chart that reflects let's say total sales and what we can
do here is say click this unit price and it will know that this is some sort of numeric value so it
immediately puts it in value but you could also drag and drop and we can do this let's say by
color so now right away we have a chart that is reflecting total sales at least
total unit price by color you can switch this title we'll say total sales this up a bit
and let's add some styling so that it reflects what we did over here so i'll add a white
background turn off transparency and a border i believe we did this one okay so now if we select
any of these options only highlight what is selected so the background is shaded out
but you can see these little dark green ones here that still reflect what we've selected
and if you control click you can select multiple at a time if you wanted to to get rid of that
you select again so this trims it down i select it again it takes that filter off
so now if we want to filter this by default we can go here and
select these filters here and it will it'll trim it down for us and and do whatever we want
but let's say we want to make something a little more clear for a user
one option here and that you'll see pretty commonly is using a slicer so let's add
this it's right here slicer click away so it doesn't replace it and select slicer
let's move it up here
now what this is looking for is an individual field that can be used
as a drop down or selectable list of anything let's say we want this to filter by category name
and by default it puts it as a list but let's say we want it to be a drop down i think it
you know this the list is too long the option here you select this drop down here and select the type
you can see list let's do drop down
but this blends in a little bit too much so we can format this as well instead of giving the
entire element a background of white let's just highlight the items bar itself so items background
we'll set this to white and now we can see what this looks like let's move everything down
now if we drop down each individual click will be a single select or you can do control i'm pressing
control and do a multi-select if you want to have the multi-select by default select the element
format and under here you can see the default single select is on if we turn that off now i
can click through i'm not pressing control and it'll filter each of them that's how you easily
add a slicer and make it a little easier for your user to filter a particular page or dashboard or
the entire report lastly we can add a title and we can add a text box add this here and
we'll just double click in here and say customer summary i'm going to make this a little bigger
and there we have it just a very basic dashboard it's really nothing fancy
obviously but i just wanted to show you how to get started so to recap what we were able to do
is go from nothing to connecting to data showing how you can do some very simple transformations
in power bi itself on your data set and then add some visuals to it and customize it in
a way that looks good for you if you found this video helpful please feel free to like the video
subscribe leave a comment and i'll see you at the next one thanks for watching