Unlock Weather Insights: How You Can Use Power BI with OpenWeatherMap — Part 10

Andrew Hubbard
Microsoft Power BI
Published in
6 min readApr 4, 2024
Sample image from the weather dashboard we will create. Background image in dashboard Photo by Tim Foster on Unsplash

For this part of the weather dashboard series of articles, we will add two more cards for maximum and minimum temperatures. Which will be copies of the “feels like” temperature card.

Creating the “Maximum” temperature card

To create this card, we will simple copy the “feels like” temperature card we created in the last part of this series and change the measure for the card and the title for the card. To do this, follow the following steps:

  • Select the “feels like” temperature card.
  • Press CTRL-C to copy the card.
  • Then press CTRL-V to paste the card.
  • Drag the card to the right and leaving a space between the two cards.

Before we edit the card, we will align this with the “feels like” card.

  • Whilst holding the Shift key down, click the “feels like” card to select it. Now, you should have both cards selected.
  • Now open the Format menu to show the Formatting options
  • Click on Align in the Formatting ribbon. This will display a dropdown menu as shown here.
Power BI Desktop Align Dropdown Menu
  • Click Align top, this will make both cards align vertically.

Now we are ready to edit the card. The following steps will detail what needs to be changed.

  • In the build a visual pane, click on the fields box which will show the “Feels Like Temperature” measure. The Data pop-up window will appear.
Fields Pop-up Window For Measure Selection
  • Now click on the Maximum Temperature measure in the _All Measures table.
  • The measure has now changed to show maximum temperature

Changing Conditional Formatting Field

We now need to edit the conditional formatting rule as the current rule is using the feels like temperature for its colouring. We need to change this to use the maximum temperature. The steps for this are:

  • Click the format button, at the far right-hand side of the Power BI Desktop window.
  • Expand the size and style option on the visual tab in the format pane.
  • Now expand the background option by clicking on it.
  • Click on the fx button for the color option.
  • This will open the Color — Size and style — Background conditional formatting window.
  • Click on the “What field should we base this on?” dropdown option list.
  • Expand the Current Weather table.
  • From this list of fields, click on temp_max. This changes the rule to use the maximum temperature.
  • We will now change the Summarization from Sum to Maximum. Click on the down arrow to expand the summarization dropdown list.
  • Select maximum from the list of summarizations.
  • Click OK to save the changes.

The completed conditional formatting for the card background should look like the image below.

The last step for this card is to change the title to match the measure we are using.

Changing Card Title

  • Expand the Title option.
  • Select all the text in the Text box by pressing CTRL-A.
  • Press delete on your keyboard to remove all the text from the text box.
  • Enter “Maximum Temperature” in the title text box.

This completes the alteration of the “feels like” card to show maximum temperature.

Now we will create the card to show the minimum temperature. The steps will mostly be the same as for creating the maximum temperature just with a change of measures used and a change to the title. I will repeat the steps to create this card below.

Creating the “Minimum” temperature card

To create this card, we will simple copy the “maximum” temperature card we created and change the measure for the card and the title for the card. To do this, follow the following steps:

  • Select the “maximum” temperature card.
  • Press CTRL-C to copy the card.
  • Then press CTRL-V to paste the card.
  • Drag the card to the right and leaving a space between the two cards.

Before we edit the card, we will align this with the “maximum” card.

  • Whilst holding the Shift key down, click the “maximum” card to select it. Now, you should have both cards selected.
  • Now from the toolbar at the top of the Power BI Desktop window, click Format to open the Formatting options
  • Click on Align in the Formatting ribbon. This will display a dropdown menu.
  • Click Align top, this will make both cards align vertically.

Now we are ready to edit the card. The following steps will detail what needs to be changed.

  • In the build a visual pane, click on the fields box which will show the “Maximum Temperature” measure. A pop-up window will appear.
  • Now click on the Minimum Temperature measure in the _All Measures table.
  • The measure has now changed to show minimum temperature

Changing Conditional Formatting Field

We now need to edit the conditional formatting rule as the current rule is using the maximum temperature for its colouring. We need to change this to use the minimum temperature. The steps for this are:

  • Click the format button, at the far right-hand side of the Power BI Desktop window.
  • Expand the size and style option on the visual tab in the format pane.
  • Now expand the background option by clicking on it.
  • Click on the fx button for the color option.
  • This will open the Color — Size and style — Background conditional formatting window.
  • Click on the “What field should we base this on?” dropdown option list.
  • Expand the Current Weather table.
  • From this list of fields, click on temp_min. This changes the rule to use the minimum temperature.
  • We will now change the Summarization from Sum to Minimum. Click on the down arrow to expand the summarization dropdown list.
  • Select minimum from the list of summarizations.
  • Click OK to save the changes.

The completed conditional formatting for the card background should look like the image below.

The last step for this card is to change the title to match the measure we are using.

Changing Card Title

  • Expand the Title option.
  • Select all the text in the Text box by pressing CTRL-A.
  • Press delete on your keyboard to remove all the text from the text box.
  • Enter “Minimum Temperature” in the title text box.

This completes the alteration of the “maximum” card to show the minimum temperature.

In this part of the series we completed the small cards to show the feels like, maximum and minimum temperatures. In the next part of this series, we will start creating the current weather panel for this dashboard.

Don’t forget to subscribe to

👉 Power BI Publication

👉 Power BI Newsletter

and join our Power BI community

👉 Power BI Masterclass

--

--

Andrew Hubbard
Microsoft Power BI

A Data analyst using Microsoft Power BI to create visualisations. With a keen interest in mental well being.