Sub topic 2
Showing Change Over Time with Line and Area Charts
Assume you have a loaded Power BI model, related tables, and basic knowledge of sums, averages, and counts. A marked date table is also assumed for time-intelligence calculations.
Showing change over time
Use a line chart when the analytical task is to show a measure across an ordered date field. Put Date[Month] on the X-axis and a measure such as total sales on the Y-axis. Use a continuous date axis when spacing between dates matters. Use a categorical axis when you need discrete labels such as fiscal periods.
Total Sales = SUM ( Sales[SalesAmount] )
Sales LY =
CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )An area chart is a line chart with filled space below the line. It emphasizes volume and broad movement, but overlapping areas can hide smaller series. Use small numbers of series and consistent colors.
flowchart TD
Q[Question about change over time] --> L[Line chart]
Q --> A[Area chart]
L --> T[Trend and comparison]
A --> V[Overall volume and movement]caption: Choosing between line and area charts alt: A decision flow from a time-based question to line or area charts.
Showing parts of a whole
Use a stacked bar, stacked column, or treemap to compare category contributions. A donut chart works only when there are a few clearly distinct parts. For many categories, use a sorted bar chart instead. Calculate percentages with a measure that removes only the category filter:
Sales % of Total =
DIVIDE (
[Total Sales],
CALCULATE ( [Total Sales], ALL ( Product[Category] ) )
)Highlighting one number
Use a card for one headline value, such as current sales. Use a KPI for a value compared with a target or previous period. Use a gauge for progress toward a fixed goal. A gauge is less useful when the target is unknown or changes frequently.
Exploring relationships
Use a scatter chart to compare two numeric measures, such as sales and profit. Add a category to the legend or details to inspect groups. A bubble-style scatter chart uses bubble size for a third measure, but large bubbles can dominate the view.
When a table or matrix is right
Use a table for exact records and a matrix for grouped rows, columns, and subtotals. Choose these visuals when readers must look up values rather than recognize a pattern.
Plotting geographic data
Use a map when location is central and the geographic field is clean. Assign fields such as country, state, city, or latitude and longitude explicitly. A filled map suits regional areas; point maps suit locations. Avoid maps when geography adds decoration but no analytical value.
Exercise
Which visual best shows monthly sales with a comparison to the previous year?
Show answer
Use a line chart with month on the axis and measures for current sales and sales from the previous year.