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

How to Create a Measures Table in Power BI and Test DAX in DAX Query View (EVALUATE, SELECTCOLUMNS)

After a few chapters of measures, the Data pane gets messy: total revenue in sales, target color somewhere else, maharashtra revenue in the parameter table because that was selected when you clicked New measure. Finding a measure becomes a hunt. A Measures Table puts every measure in one place, at the top of the Data pane, with its own icon. In the second half of this chapter you open DAX query view, a practice space where you can run DAX and see the result as a table without changing your data, model or report.

What you'll learn in this chapter

  • Why measures end up in different tables
  • Enter data: an empty table named Measures Table
  • Measure tools › Home table
  • Deleting Column1 and the icon change
  • DAX query view: EVALUATE, TOPN, a whole table
  • SELECTCOLUMNS with and without names, custom headers
  • SUMMARIZECOLUMNS: a 1×1 table vs a single value, and grouping

Practice file: blinkit-sales-2025-metrics.csv (800 order lines), with the measures from the previous two chapters.

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

1. The problem

A measure lives in whichever table was selected when you clicked New measure. After two chapters, total revenue, total sales, total orders, total profit and dairy revenue sit in sales, while maharashtra revenue landed in Metric Selector. In a bigger model with ten tables, nobody can find anything.

Classroom line

Suppose my measures right now are all in different tables.

2. The idea in simple words

A Measures Table is an empty table whose only job is to hold measures, like a folder. Moving a measure there changes only where it is listed; its formula and result stay the same.

DAX query view (the fourth icon on the left, below Model view) runs DAX queries and shows the result as a grid. Nothing you run there changes the tables, the data or the report. Every query starts with EVALUATE followed by something that returns a table.

3. The data

The measures to collect:

Measure Value (no filter) Home table now
total revenue ₹1,48,221 sales
total sales 1,431 sales
total orders 496 sales
total profit ₹42,482 sales
maharashtra revenue ₹44,763 Metric Selector

4. Step by step

Create the Measures Table

  1. Home › Enter data. Leave the grid empty. Name: Measures Table. Load. A table with one empty column, Column1, appears.
  2. Select total revenue in the Data pane › Measure tools › Home table › Measures Table. It moves.
  3. Repeat for every measure.
  4. In Measures Table, Column1 › three dots › Delete from model › Yes.
  5. The table's icon changes to the measures-table icon and it moves to the top of the Data pane.
Home › Enter data › leave empty › name "Measures Table" › LoadSelect a measure › Measure tools › Home table › Measures TableRepeat for every measureColumn1 › Delete from modelThe icon changes to a measures tableIllustration (fictional data)

Figure 1. Create an empty table, move each measure with Home table, then delete Column1 (illustration).

Classroom line

We can't delete the column before adding a measure, because a table must have at least one field.

DAX query view

  1. Click the fourth icon on the left, DAX query view.
  2. Type EVALUATE TOPN(100, 'sales') › Run. The results grid shows 100 rows of sales.
  3. Replace it with EVALUATE sales › Run: all 800 rows.
  4. Remove the word EVALUATE and run sales: Power BI shows a query syntax error. Every query needs EVALUATE.
  5. Run:

    EVALUATE SELECTCOLUMNS(sales, sales[category], sales[state])

    The headers come out with the table prefix, like sales[category]. 11. Give each column a name:

    EVALUATE SELECTCOLUMNS(sales, "category", sales[category], "state", sales[state])

    The headers are now clean: category, state. 12. The header is whatever text you write, not the column name: SELECTCOLUMNS(sales, "products", sales[category]) shows the categories under the header products. 13. Run EVALUATE SUMMARIZECOLUMNS("Total revenue", SUM(sales[revenue])). The result is a table with one row and one column, Total revenue = 148221. (Leave out the name "Total revenue" and you get a syntax error.) 14. For a true single value, use EVALUATE { SUM(sales[revenue]) } (one value, header Value) or EVALUATE ROW("Total revenue", [total revenue]). 15. The real job of SUMMARIZECOLUMNS is grouping:

    EVALUATE SUMMARIZECOLUMNS(sales[category], "Revenue", [total revenue])

    Four rows: Dairy & Bakery 59,124, Snacks & Branded Foods 35,200, Staples 30,290, Beverages 23,607.

Classroom line

Power BI has given us a place to practise: DAX query view.

Classroom line

We are showing category, but what title did I write? products.

Classroom line

Without EVALUATE, nothing runs in DAX query view.

5. Your result should look like this

  • Data pane: Measures Table at the top with the measures-table icon, holding all five measures; the cards still show the same values.
  • DAX query view: SELECTCOLUMNS with names returns 800 rows with headers category and state; SUMMARIZECOLUMNS("Total revenue", …) returns a 1×1 table (148221); grouping by category returns 4 rows.
Without names: headers keep the table prefixsales[category]sales[state]With names: clean headerscategorystateDairy & BakeryMaharashtraStaplesKarnatakaBeveragesGujaratIllustration (fictional data)

Figure 2. Without names the headers keep the table prefix; with names they are clean (illustration).

6. What happened

  • Enter data created a real (empty) table; Home table changed only where each measure is listed.
  • A table must always have at least one field, so Column1 can go only after the first measure has moved in.
  • Once a table holds only measures, Power BI treats it as a measures table and shows it first.
  • In query view, EVALUATE returns a table to the results grid; nothing is saved into the model.

Classroom line

Writing here won't change our tables, our data or our report.

7. Explore further

  • Names must be unique. A second table called Measures Table is refused, because every table name in the model must be unique. Use _Measures if you want it to sort first by name too.
  • Test an unexpected result. When a measure or column gives a number you don't expect, rebuild it piece by piece in query view: EVALUATE ROW("rev", [total revenue], "MH", [maharashtra revenue]), then add one filter at a time until the number changes.
  • Table, not value. SUMMARIZECOLUMNS always returns a table, even a 1×1 one; { … } and ROW are the ways to ask for a single value.
  • Distinct values. SELECTCOLUMNS returns one row per sales row (800). Wrap it in DISTINCT to see each category–state pair once: 20 rows.
  • More. How to Create a Conditional Column in Power BI: Weekday vs Weekend (Power Query and DAX IF) first introduced query view; the main course lessons DAX Query View and Implicit vs Explicit Measures and Measure Tables go further.

Classroom line

Sometimes you can't tell where the error is; test it here.

Classroom line

This is simply for practice, for testing.

8. Common mistakes

Wrong result Reason Fix
Cannot delete Column1 No measure moved in yet Move one measure first
"Measures Table" name refused A table with that name already exists Use a unique name
Icon did not change Column1 still there Delete Column1 from model
Query syntax error EVALUATE missing Start with EVALUATE
Headers show sales[category] Columns not named "category", sales[category]
Syntax error in SUMMARIZECOLUMNS Expression without a name "Total revenue", SUM(sales[revenue])
Expected one number, got a table SUMMARIZECOLUMNS returns a table EVALUATE { SUM(sales[revenue]) } or ROW(…)

Ravindra Bagale's Tip

Create the Measures Table at the start of a project, before the first measure. Then select it every time you click New measure, and you never have to move anything later.

9. Practise on your own

Practice task

Using blinkit-sales-2025-metrics.csv and your measures:

  1. Move all measures into a Measures Table and delete Column1. Does total revenue change?
  2. In DAX query view, show the first 5 rows of sales.
  3. Show city and state with clean headers, one row per pair. How many rows?
  4. Show total orders by state with SUMMARIZECOLUMNS. Which state has the most orders?
Show solution
  1. No: still ₹1,48,221.
  2. EVALUATE TOPN(5, 'sales').
  3. EVALUATE DISTINCT(SELECTCOLUMNS(sales, "city", sales[city], "state", sales[state])): 10 rows.
  4. EVALUATE SUMMARIZECOLUMNS(sales[state], "Orders", [total orders]): Maharashtra, 178.

10. Think like a professional

  • Business view. A tidy Data pane makes a report easy to hand over; the next person finds every measure in one place.
  • One home. Keep all measures in the Measures Table; use display folders when it grows.
  • Test before you build. Check a measure's number in query view before putting it on a visual.
  • Sandbox. Query view is safe for experiments; nothing changes until you build it into the model.

Interview questions

  1. How do you create a measures table? Enter data with an empty table, move measures with Home table, then delete the placeholder column.
  2. Does moving a measure change its result? No; only where it is listed.
  3. What does DAX query view do? Runs DAX queries and shows results without changing the model or report.
  4. Why is EVALUATE needed? A DAX query must start with EVALUATE followed by a table expression.
  5. What does SUMMARIZECOLUMNS("Total revenue", SUM(sales[revenue])) return? A table with one row and one column, not a scalar.

Recap

In short

  1. Home › Enter data › empty › Measures Table › Load.
  2. Measure tools › Home table moves each measure; results stay the same.
  3. Delete Column1 after a measure is in; the icon changes.
  4. DAX query view: EVALUATE TOPN(100, 'sales'); no EVALUATE, no result.
  5. SELECTCOLUMNS names set the headers (even "products").
  6. SUMMARIZECOLUMNS returns a table (1×1 for a total); use { } or ROW for one value; group with SUMMARIZECOLUMNS(sales[category], "Revenue", [total revenue]).

Ravi Sir's Cards for this lesson

मराठी cards