Ravindra BagaleCourses & study guides मराठी Track your progress

How to Use a Line Chart in Power BI: Date Hierarchy, Drill Down and Find Anomalies

When the X-axis is time, the line chart is the right visual: the eye follows the line and sees rises, dips and repeating patterns at once. Power BI gives a date field a built-in hierarchy (year, quarter, month, day), so the same chart can show three years or a single month. In this chapter you build a revenue line, move up and down the hierarchy, learn the one trap when you remove a level, find the festival-season and payday patterns in Blinkit data, and let Power BI point out the odd days with Find anomalies.

What you'll learn in this chapter

  • Line chart for time on the X-axis
  • Date hierarchy: Year › Quarter › Month › Day
  • Removing a level adds the years together
  • Drill down vs Expand all down one level
  • Festival season (Q3/Q4) and payday spikes
  • Analytics pane › Find anomalies and Possible explanations

Practice file: blinkit-sales-2023-2025.csv (1,702 order lines, 01-01-2023 to 31-12-2025).

Made-up data: fictional Blinkit-style sales, for practice only. Amounts are in ₹ and dates are DD-MM-YYYY.

1. The problem

The manager asks: is revenue growing year on year, which part of the year is busiest, and were there any unusual days worth explaining? A table of 1,095 days cannot answer that; a line can.

2. The idea in simple words

Use a line chart when the X-axis is time. Drop a date field on the X-axis and Power BI shows its date hierarchy: Year, Quarter, Month, Day. Each level is a different zoom. The trap: if you remove Year and keep Quarter, each quarter adds up all years (Q3 = Q3 2023 + Q3 2024 + Q3 2025). That is useful for seasonality, but it is no longer a timeline.

Year: 2023, 2024, 2025Quarter: Q1–Q4 inside each yearMonth: January–DecemberDay: 1–31 (day of the month)Remove Year: each quarter adds up all three yearsIllustration (fictional data)

Figure 1. The date hierarchy levels; removing Year combines the years (illustration).

Classroom line

What does this tell us? Nothing yet.

3. The data

Year Revenue (₹)
2023 1,00,708
2024 1,11,253
2025 1,18,882
Quarter (all years) Revenue (₹)
Q1 76,775
Q2 66,483
Q3 89,853
Q4 97,732

4. Step by step

Line by year and quarter

  1. Line chart: X-axis order_date, Y-axis revenue. It opens at Year: three points rising from 1,00,708 to 1,18,882.
  2. Click the double down arrow (Go to the next level in the hierarchy): Year and Quarter, 12 points.
  3. Next level: months; next: days of the month.

Remove a level

  1. In the X-axis well, remove Year (click its ×). Now there are four points, Q1–Q4, each the sum of all three years: Q4 97,732 is highest.
  2. Remove Quarter: 12 months, each summing three years. Remove Month: days 1–31, each summing every month of every year.

Expand all

  1. Put Year, Quarter, Month back. Click the forked arrow (Expand all down one level): Year and Quarter labels together, then Year, Quarter and Month: one continuous timeline.

Find anomalies

  1. Back at the daily level for 2025 (filter order_date to 2025, expand down to Day). Open the Analytics pane (magnifier icon) › Find anomalies › On.
  2. Dots appear on unusual points. Click the dot on 14-03-2025: the Anomalies pane opens with Possible explanations.
Revenue by quarter, 2023–2025 (₹): Q3 and Q4 rise every yearQ1 23Q2 23Q3 23Q4 23Q1 24Q2 24Q3 24Q4 24Q1 25Q2 25Q3 25Q4 2522,69621,11925,28831,60527,13021,18029,15933,78426,94924,18435,40632,343Illustration (fictional data)

Figure 2. Revenue by quarter, 2023–2025: Q3 and Q4 rise every year (illustration).

Classroom line

What's an anomaly? A sudden jump in sales; we want to know what happened that day.

5. Your result should look like this

  • Year level: 1,00,708 › 1,11,253 › 1,18,882, growing each year.
  • Year and Quarter: Q4 2024 (33,784) and Q3 2025 (35,406) are peaks; Q2 is the low point every year.
  • Day of month (all years): days 1, 2, 3 at 21,207, 17,540 and 16,197, against roughly 10,000 on other days.
  • Anomaly: 14-03-2025 (a Friday) at ₹1,969, against an average of about ₹330 a day that month.
Revenue by day of the month, all years (₹): days 1–3 jump13579111315171921232527293121,20717,54016,197Illustration (fictional data)

Figure 3. Revenue by day of the month: the first three days jump (illustration).

Classroom line

Go on, try it yourself.

6. What happened

  • Each hierarchy level groups the dates differently; drilling changes the grouping, not the data.
  • Without Year, the chart groups by quarter or month alone, so it shows seasonality across years.
  • Expand all keeps the higher levels, so the axis stays a real timeline.
  • Find anomalies compares each point with the expected range and marks those outside it.

7. Explore further

  • Festival season. Q3 and Q4 are higher every year: September to November brings Ganpati, Navratri and Diwali, and households stock up.
  • Payday. Days 1–3 of each month are the busiest: salaries arrive and people order bigger baskets.
  • Possible explanations. For 14-03-2025 Power BI may point to a category (Atta, Rice, Oil & Dals made ₹995 of the ₹1,969) or a city (Bengaluru ₹900). Treat these as leads to check, not proof.
  • Not only time. A line chart can take any ordered X-axis, but time is where it is clearest.
  • More. The main course lessons Line, Area and Stacked Area Charts, Drill Down vs Expand – The Difference and Anomaly Detection on a Line Chart go further.

Classroom line

Let's go through the visuals one by one, in detail.

8. Common mistakes

Wrong result Reason Fix
Only 4 points, "Q1–Q4" Year removed Keep Year, or use Expand all
A single flat point Hierarchy at Year with one year filtered Drill down a level
Dates show 1–31 only Year, Quarter and Month removed Put them back or use Expand all
No Find anomalies option Visual is not a line chart with a date axis Use a line chart with a date on X
Explanations read as facts They are statistical hints Check them in the data

Ravindra Bagale's Tip

Before you read a line, look at the X-axis label. "Quarter" with no year means all years added together; "Year Quarter" is a timeline. Half the wrong conclusions from line charts come from that one word.

Classroom line

Until now we were looking at one value at a time.

9. Practise on your own

Practice task

Using blinkit-sales-2023-2025.csv:

  1. What is the revenue for Q3 2025?
  2. Remove Year: what is Q2 (all years)?
  3. Filter to 2025 and show months. Which month is highest, and how much?
  4. With Year, Quarter and Month removed, which day of the month is highest?
Show solution
  1. ₹35,406.
  2. ₹66,483 (the lowest quarter).
  3. November, ₹13,316.
  4. Day 1, ₹21,207.

10. Think like a professional

  • Business view. Seasonality (festivals, paydays) drives stock and staffing plans.
  • Know your axis. Say whether the chart is a timeline or a seasonal sum.
  • Investigate anomalies. A spike is a question: an offer, a bulk order, a data error?
  • Context matters. Festival reasoning fits Indian data like this; check the calendar for any other market.

Interview questions

  1. When do you use a line chart? When the X-axis is time.
  2. What happens if you remove Year from the date hierarchy? Each quarter or month sums all years.
  3. Drill down vs Expand all down one level? Drill down shows the next level alone; Expand keeps the higher level labels too.
  4. What does Find anomalies do? Marks points outside the expected range and offers possible explanations.

Recap

In short

  1. Line chart for time on the X-axis.
  2. Date hierarchy: Year › Quarter › Month › Day.
  3. Removing Year sums all years per quarter or month.
  4. Expand all down one level keeps a true timeline.
  5. Analytics › Find anomalies › click a dot for Possible explanations.

Ravi Sir's Cards for this lesson

मराठी cards