Building a QC Dashboard Pt. 5
Hello everyone! Are you ready for?Part 5?of our QC Dashboard journey?
I know I am!
In Part 4 we wrapped up exploring some of the things Power Query can do with and for our data. In this article we will explore Power BIs Model view.
Let's get started!
Part 5 - Model View
Now that I have the data loaded into Power BI, I like to Now that the data is in Power BI I can link my sources together. This is done automatically by Power BI by default. Sometimes that works okay and sometimes the links that are made are not what I want. So, I like to make my connections myself.
To get to the Model view, click on the icon red arrow is pointing to below.
The Model view displays our inputted data as shown below. From here we can connect each source by way of key fields. If you have been following my past posts, I discussed Primary and Foreign Keys in my Data Model article. The same principal applies here.
I am going to connect/link the BuildingDetails table with the FloorDetails table via the Building ID field. The Building ID field in the BuildingDetails table is the Primary Key for that table and a Foreign Key in the FloorDetails table.
I simply left-click and hold the Building ID field in the BuildingDetails table and drag it to the Building ID field in the Floor Details table.
I now have a connection as shown below. The "1" represents the uniqueness of the Building ID field, as there is only one Building ID per row. And the "*" represents the manyness (is that word?! LOL) as there are many, or more than one, Building ID represented. As there can be many floors in one building.
领英推荐
I did the same thing to the FloorDetails and SpaceDetails tables, as shown below, and as we can see, the Field names do not need to be the same, as long as the values in the field are. So, the Floor ID field, from the FloorDetails table, is connected to the Floor Number field, from the SpaceDetails table.
My data is now linked!
So, what does that mean???
It basically means I can combine and use information from all connected tables to create reports and charts. It is easier to show an example than type and explanation...
Below I am back in the Report view. I created a simple table chart and dragged various fields from each of the three tables. I didn't have to vlookup anything. I just dragged some Building fields from the BuildingDetails table, some from the FloorDetails table, and a some from the SpaceDetails table.
The Space fields "know" what Floor they "belong" to and similarly, what Building. I don't even need to have a Building ID field in the SpaceDetails table, since it is connected to the BuildingDetails table via the FloorDetails table. It is the FloorDetails table the "knows" what Building the each Floor belongs to and the Spaces "know" which floor they belong to.
Whew! Pretty easy (and cool!). Right?
Of course the above is a pretty basic example but it shows the Power (see what I did there) of Power BI.
In the next article I will go over the Data view and some of the cool things we can do in there, like calculated columns.
I know some of this stuff may be pretty boring but we are building the foundation to our QC Dashboard and we nee do to walk before we can fly!
Thanks for reading and if you have any questions,?do not hesitate?in adding a comment or messaging me. I am always willing to help! And if you liked what you read, share the love by sharing the post. :)