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

How to Create Your First DAX Measure in Power BI: SUM, Card Visual and Explicit vs Implicit Measures

Columns you add in Power Query give every row a new value. But most questions on a report page are about a total: how much revenue this year, what is the average price, are we above target? That is the job of a measure: a small DAX formula that returns one value for whatever is currently filtered. In this chapter you write your first measure, put it on a Card, see why DAX insists on an aggregation, and compare your own (explicit) measure with the automatic (implicit) one Power BI creates when you drag a column.

What you'll learn in this chapter

  • Excel SUM(range) vs DAX SUM(Table[column])
  • New measure: name on the left, formula on the right
  • Why a bare column reference errors
  • Card for a single value; AVERAGE price
  • Explicit vs implicit measures, and when they differ
  • Measure vs calculated column
  • Report pages vs dashboards; formatting a card

Practice file: blinkit-sales-2025-measures.csv (700 order lines).

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

1. The problem

You have 700 order lines for 2025 and want a page that answers "how much revenue?" at a glance, and the same number by category, by state and for any slicer selection. Writing a new total for each case by hand is impossible. You need one formula that recalculates itself for whatever is shown.

2. The idea in simple words

In Excel you would write =SUM(C4:C10): a range of cells. In DAX you point at a whole column of a table: SUM(sales[revenue]). A measure has a name, an equals sign and a formula:

total revenue = SUM(sales[revenue])

Whatever is left of = is the measure's name. The formula is not calculated row by row and stored; it is calculated when a visual asks for it, for the rows that visual is showing.

Classroom line

Look, the name is DAX. The job is just writing a formula.

3. The data

blinkit-sales-2025-measures.csv: columns order_id, order_date, product_id, category, state, price, sales (units) and revenue (₹).

Category Revenue (₹)
Dairy & Bakery 55,919
Staples 31,280
Snacks & Branded Foods 30,690
Beverages 20,568
Total 1,38,457

1,266 units in total; average price ₹105.57.

4. Step by step

Load and create the measure

  1. Get data › Text/CSV › the file › Load. In the Data pane, rename the table sales (double-click its name).
  2. In the Data pane, click the three dots … next to sales › New measure.
  3. In the formula bar, replace Measure = with total revenue = SUM(sales[revenue]). Start typing SUM and let autocomplete fill the table and column. Press Enter.
  4. The measure appears under sales with a calculator icon.

Show it on a Card

  1. Click an empty spot on the canvas › Visualizations › Card.
  2. Drag total revenue into Fields. The card shows 138.46K.

A second measure

  1. Three dots on sales › New measure › avg price = AVERAGE(sales[price]). Put it on another card: 105.57.

See the error

  1. Try test = sales[revenue]. Power BI refuses: A single value for column 'revenue' in table 'sales' cannot be determined. A measure must return one value, and a column has 700. Delete the test measure.

Classroom line

On the table where you want the measure, click its three dots and click New measure.

Classroom line

Whatever is on the left of the equals sign is the measure's name.

5. Your result should look like this

  • Card 1, total revenue: 138.46K (after formatting below: 1,38,457).
  • Card 2, avg price: 105.57.
  • In the Data pane: sales › total revenue and avg price, both with the calculator icon.

6. What happened

  • SUM added the 700 revenue values that the card could see (no filter = all rows).
  • A measure needs an aggregation such as SUM, AVERAGE, MIN, MAX or COUNT because it must turn many rows into one value. A bare sales[revenue] has no single row to read, so it errors. This is a common interview question.
  • A single value belongs in a Card (or a KPI visual).

Classroom line

In a measure, we use aggregation functions.

Classroom line

When the result is a single value, use a Card or a KPI visual.

7. Explore further

Explicit vs implicit

Drag the revenue column (not the measure) onto a new card. Power BI makes an automatic Sum of revenue: an implicit measure. It shows the same 1,38,457. Your total revenue is an explicit measure.

Implicit: drag revenue to the cardSum of revenue1,38,457Explicit: your own measuretotal revenue = SUM(sales[revenue])1,38,457Both are calculated when the visual asks (query time). Neither is stored.Calculated column: calculated at refresh and stored on every rowMeasure: one value for whatever is filteredIllustration (fictional data)

Figure 1. Implicit and explicit measures give the same number; both are calculated when the visual asks. Calculated columns are the ones stored on every row (illustration).

Both are calculated at query time and neither is stored, so speed is about the same. Prefer explicit measures because:

  • you can reuse them inside other measures (profit = [total revenue] - [total expense]);
  • the formula and its format live in one place;
  • names stay consistent across pages;
  • some features need them (calculation groups, the "Discourage implicit measures" setting) and tools like Analyze in Excel work with them.

The main course lesson Implicit vs Explicit Measures and Measure Tables goes further, including a dedicated measure table.

Same number by category

Add a Stacked column chart: X-axis category, Y-axis revenue (implicit). Copy it and swap the Y-axis for total revenue. Both charts show the same four bars: the measure recalculates for each category.

total revenue by category (₹)55,919Dairy & Bakery31,280Staples30,690Snacks & Branded Foods20,568BeveragesIllustration (fictional data)

Figure 2. total revenue by category: one measure, recalculated for each bar (illustration).

Measure vs calculated column

Calculated column Measure
Calculated At refresh, for every row When a visual asks
Stored Yes, a value on each row No, only the formula
Result One value per row One value for the current filter
Use for Slicers, axes, row-level labels Totals, averages, KPIs

The columns you added in How to Add Custom Columns in Power Query: GST, Final Price and Discount Formulas are row-level; revenue totals are measures. See also Calculated Columns vs Measures – In Depth and Aggregation Functions for SUM, AVERAGE, MIN, MAX and COUNT.

Report pages and dashboards

One visual is a chart. A report page holds many visuals, and the Desktop file is a report with one or more pages. A dashboard is something else: a Power BI Service canvas of visuals pinned from reports. A typical page, top to bottom:

One report page, top to bottomSlicer: YearSlicer: StateTotal revenuecardOrderscardUnitscardAvg pricecardColumn chart: revenue by categoryPie chart with legendLine chart: revenue trend by monthTable: top ordersIllustration (fictional data)

Figure 3. One report page: slicers at the top, four KPI cards, column and pie charts, then a trend line and a table (illustration).

Classroom line

How much you fit on one page is up to you.

Format the card

  1. Select the total revenue card › Format visual › Callout value: font Segoe UI Bold, size 50.
  2. Display units › None: the card shows the full number, 1,38,457 (digit grouping follows your Windows regional settings; with English (India) you get 1,38,457).
  3. To centre it, use the card's horizontal alignment where your version has it. Padding (for example Padding left) also moves the number, but it is a rough way to centre.

Classroom line

Now let's remove this 'K' and show the full number.

8. Common mistakes

Wrong result Reason Fix
"A single value for column … cannot be determined" Bare column in a measure Wrap it: SUM(sales[revenue])
Measure appears in the wrong table New measure clicked on another table Select the measure › Measure tools › Home table
Card shows 138.46K Display units Auto Display units › None
Measure named "Measure" Name not typed left of = total revenue = …
Count (Distinct) of revenue on the card Dragged the column, summary changed Use the explicit measure

Ravindra Bagale's Tip

Type your first few measures by hand instead of copying them. Start with SUM, let autocomplete offer sales[revenue], press Enter. After five measures, the pattern name = FUNCTION(table[column]) sticks for good.

Classroom line

This question comes up in every interview.

9. Practise on your own

Practice task

Using blinkit-sales-2025-measures.csv:

  1. Create total units = SUM(sales[sales]). What does it show?
  2. Create avg revenue = AVERAGE(sales[revenue]). Round to 2 decimals.
  3. Make a column chart of total revenue by state. Which state is highest, and by how much?
  4. Does a card with the implicit Sum of revenue match total revenue?
Show solution
  1. 1,266.
  2. 197.80 (₹1,38,457 ÷ 700).
  3. Maharashtra, ₹52,518; then Karnataka 28,413, Telangana 22,572, Tamil Nadu 21,830, Gujarat 13,124.
  4. Yes: 1,38,457 both.

10. Think like a professional

  • Business view. KPIs on a page (revenue, units, average price) are measures; build them once and reuse them everywhere.
  • Naming. Use clear names (total revenue, avg price); keep measures in one home table.
  • Columns vs measures. If you need it on a slicer or axis, it is a column; if it is a total that should react to filters, it is a measure.
  • Format once. Set the format on the measure (Measure tools › Format) so every visual shows it the same way.

Interview questions

  1. What is a measure? A DAX formula that returns one value for the current filter, calculated at query time.
  2. Why does = sales[revenue] error in a measure? A measure must return one value; a bare column has many, so it needs an aggregation.
  3. Explicit vs implicit measure? Explicit is written by you; implicit is made automatically when a column is dragged. Both calculate at query time; explicit is reusable and consistent.
  4. Measure vs calculated column? A column is calculated at refresh and stored per row; a measure is calculated when needed for the current filter.

Recap

In short

  1. Data pane › … › New measure: total revenue = SUM(sales[revenue]).
  2. A measure needs an aggregation; a bare column errors.
  3. Single values go on a Card (or KPI).
  4. Explicit and implicit give the same number; explicit is reusable.
  5. Columns are stored per row; measures calculate at query time.
  6. Display units None shows 1,38,457.

Ravi Sir's Cards for this lesson

मराठी cards