CITE2021 How to get started and utilize visual dashboards using Power BI

Follow the directions below to create this report

report

Slide Deck from this CITE 2021 Conference Workshop How to get started and utilize visual dashboards using Power BI

Get -> Transform -> Model -> Report

Get

Use Power BI deskop to Get Enrollment Files

  1. Download the following files using your browser:

    Download 2020–21 Enrollment

    Download 2019–20 Enrollment

    Right click, select Save As, and save to Desktop or other location.

    Chrome

    Chrome

    Edge

    Edge

    To look at the structure of the files refer to the file structure

  2. Import the file into Power BI Desktop

    • Open Power BI and click on Get data>Text/CSV

      GetData

    • Click on enr20.txt and click Open

      openText

    • Power BI should determine that the file is Tab Delimited

      tabDelimited

Transform

Use Power BI deskop to Transform Enrollment Files

  1. Transform the datatypes of columns in the file

    • Click on Transform Data

    • The first 6 columns should be of type Text. Click on the CDS_CODE and ETHNIC columns and change the type to Text

      textColumns

    • The remaining colums should all be Whole Numbers

      wholeNumberColumns

    • Check that the numbers are Whole numbers (Integers) and click Close & Apply

      closeAndApply

  2. Review the Data and Model tabs

    • Click on the Data tab to see the data returned into Power BI

      dataTab

    • Click on the Model tab to see the table created by the import

      modelTab

  3. Transform the data by creating a new dataset with breakdown by Elementary School (K through 4), Middle School (5 through 8), and High School (9 through 12)

    • Click on the Transform data button on the Model or Report tab and select Transform data

      transformData

    • Right click on the enr20 query and select Duplicate

      duplicate

    • Right click on the enr20 (2) query and select Rename to change its name to schoolType

      rename

      schoolType

    • With schoolType highlighted select Add Column

      addColumn

    • Select Custom Column and enter

      New column name: Elementary

      Custom column formula:

      [KDGN]+[GR_1]+[GR_2]+[GR_3]+[GR_4]
      

      customElementary

    • Click OK

    • Make sure the data type for the new Elementary column is set to Whole Number

      wholeNumberElem

    • Select Custom Column and create two more columns:

      A) Middle School

      New column name: Middle

      Custom column formula:

      [GR_5]+[GR_6]+[GR_7]+[GR_8]
      

      B) High School

      New column name: High

      Custom column formula:

      [GR_9]+[GR_10]+[GR_11]+[GR_12]
      
    • Make sure the data type for the new Middle and High columns are set to Whole Number

    • Remove the ADULT Column

      removeAdult

    • Remove all the Grade Columns. Select KDGN and hold down the shift key and then select UNGR_SEC. This will select all the columns between and including KDGN and UNGR_SEC

      kdgn

      ungrsec

    • Right click on the yellow bar and select Remove Columns

      removeColumns

    • The remaining Columns should be: CDS_CODE", "COUNTY", "DISTRICT", "SCHOOL", "ETHNIC", "GENDER", "ENR_TOTAL", "Elementary", "Middle", "High"

    • Click Close & Apply. This is what it looks like in the Data tab

      dataTabSchoolType

  4. Add in the descriptions for Ethnic Codes

    • Click on the Transform data button on the Model or Report tab and select Transform data

      transformData

    • Click on the schoolType query and select the ETHNIC column and right click and choose Add Column From Examples

      columnFromExample

    • Look for the Racial/ethnic designation

    • Copy and paste the descriptions to the codes and click OK

      ethnicDesignation

    • Name the Custom Columnn "EthnicDesignation"

    • Click Close & Apply

Model

Use Power BI deskop to Join County info

After you clicked on Close & Apply go to the Model tab.  You should have 2 tables that look like this.  Representing the two queries in the Transform Data

twoTables

Lets go get some more data on the California Counties from the web to add to the model
  1. Get Data from Wikipedia

    • Click on Get data>Web

      getWeb

    • Cut and Paste the following URL (Stay with default basic) and click OK

    https://en.wikipedia.org/wiki/List_of_counties_in_California
    

    basicWeb

    • Click on Anonymous and click on Connect

      connect

    • Click on Table 2 and then Click Transform Data

      table2

    • Rename the Table 2 query to County and remove the Changed Type Applied Step ({"FIPS code[5]", Int64.Type}, changed it to Integer but it should be text because it has leading zeros)

      fips

    • Select the County column, right click and select Duplicate Column

      dup

    • Rename the new column CountyJoin and right click and delect Split Column > By Delimiter

      byDelimiter

    • Go with Space and Each occurence of the delimiter and click OK

      space

    • Notice that you got a bad split for the two word county names

      badSplit

    • Delete the last to steps of the Applied Steps (Change Type and Split Column By Delimiter)

    From delSteps1

    To delSteps2

    • Lets use Replace Values instead

      replaceValues

    • Enter a space followed by County in the Value to Find box and leave the Replace with box empty. Click OK

      replaceCounty

    • Couple last transformations. Change the type of Population column to Whole Number and remove the Map column

    • Click Close & Apply

    • Go to the Model tab and drag CountyJoin in the County table on to COUNTY in the schoolType table to create a many to 1 join

      twoTableModel

    • You can also create and edit the join in Manage relationships

      manageRel

    • Hide the the enr20 table by clicking eye icon in the top right corner of the table

      hide

    • You are now ready to create some reports and visualizations

Report

Use Power BI deskop to create a report

Now I would like you to build a report that looks like this

report

To create the report lets divide it into 6 sections

sixSections

Section 1 looks like this:

1map

and uses the following visualizations and fields:

1mapFields

Section 2 looks like this:

2grid

and uses the following visualizations and fields:

2gridFields

Section 3 looks like this:

3bar

and uses the following visualizations and fields:

3barFields

Section 4 looks like this:

4grid

and uses the following visualizations and fields:

4gridFields

Section 5 looks like this:

5bar

and uses the following visualizations and fields:

5barFields

Section 6 looks like this:

6slicer

and uses the following visualizations and fields:

6slicerFields

After some formatting fixes it should look something like this:

sections

Publish the Power BI report to powerbi.microsoft.com

Save the Report and click on Publish, chose My workspace, and click Select

publish

Login to powerbi.microsoft.com with your userid and password and open your report

viewReport