Washington State's Gasoline Price Hit the historical High - PowerBI Dashboard

Washington State's Gasoline Price Hit the Historical High

Recently, I heard the news that the gas price of Washington hit a historical high in June 2023 , even unseated California, though the Gas prices are still lower than the inflation-plagued summer months last year. The average price in King County exceeded $5 a gallon on Jun 21st per The Seattle Times. No wonder when I fill up my gas at Costco, the price is almost 5 dollars per gallon. Normally, I'm not price sensitive, but this time, it surprised me.

So I grabbed the dataset from U.S. Energy Information Administration and work out a Power BI dashboard. 



The first chart which is the Line and clustered Column Chart to show the gas price tendency of Washington State together with other 4 states as California, Texas, New York and Florida. The gas price I'm using is All Grades All Formulations Retail Gasoline Prices(Dollars per Gallon). It looks like California always has the highest gas price in the past 5 years and Washington ranked 2nd place until June 2023. 


I also put the important events during these 5 and half years as columns on the chart.


The 2nd chart is the clustered column chart to show the price change rate on the same month between two consecutive years for the Washington state. For example, compare the price of Jan 2018 and the price of Jan 2019 to see if it increases/decrease rate.


You can see the price has increased a lot from 2020 to 2021, and from 2021 to 2022. The average change rate for the same month of 2020 to 2021 is 29.61%. There are 8 months' change rate above it. The average change rate for the same month of 2021 to 2022 is 33.46%. There are 7 months' change rate above it. The change rate of Jun 2021 to Jun of 2022 is the highest which is 50.94%. This kind reflects that the inflation rate has largest increase in 40 years in Jun 2022.
The process of creating this dashboard is as below:
  1. Import the data files as csv format to the Power BI.
  2. Create a calendar table to add to the data model. A calendar table helps in better data manipulation regarding different date range filtering, date calculations, etc. Here is the DAX code of the calendar table.

Use the CALENDARAUTO( ) function to get all the dates and limit the date range within the date range of City_Monthly_GasPrice table, then generate the columns like Year, Month, Quarter, YearMonth and MonthYear.

  1. Create an event table to be shown as the columns in the Line and clustered Column Chart.

  2. Work out the price change rate on the same month between two consecutive years. 

        

    5.   Create the data model with the relationships.

    6. Select the proper charts to present the data and tell the story. 

Comments

Popular posts from this blog

Schema and Security Control in SQL server

The statistics of competition results in Excel