Skip to the page

Excel and BI · mid

Star-schema modelling, measures and columns

Power BI models work best as a star: a fact table joined one-to-many to dimensions, with a proper Date table. Use measures for ratios and anything that depends on filters, and columns for row-level labels.

The notes

What you must know

  • Split a flat extract into a fact table (keys, quantity, amount, discount) and dimensions (Date, Product, Store, Customer), joined one-to-many with single-direction filters. Microsoft's guidance recommends star-schema design.
  • The Date table has every day with no gaps, whole years, Indian financial-year columns (April to March), and is marked as a date table. Turn off auto date/time.
  • Targets at a different grain go in a second fact table linked to shared dimensions at their level, for example month and region.
  • Two dates (order and delivery): two relationships to Date, one inactive, and USERELATIONSHIP in the delivery-date measures.
  • Avoid both-way filters and many-to-many unless there is a clear reason (a bridge table). They make filters ambiguous and queries slow.
  • Storage: Import for most models; DirectQuery for near-real-time or very large data, with a speed cost; Direct Lake when the data is already in Microsoft Fabric.
  • Calculated column: row by row at refresh (row context), stored in the model, usable in slicers and axes. Measure: computed at query time under the visual's filters (filter context), not stored.
  • Margin % as a column then summed or averaged gives a sum or average of ratios. Use a measure: DIVIDE(SUM(Sales[Profit]), SUM(Sales[Amount])). DIVIDE returns blank instead of an error for zero.
  • SUM adds one column. SUMX goes row by row over a table, evaluates an expression, then adds. Do columns that need no DAX in Power Query or at the source, where they compress better.

The red pen

Common traps: mistake → fix

  • Mistake: One flat table with both-way filters is simpler

    Fix: it is bigger, slower and filters become ambiguous.

  • Mistake: Make everything a calculated column

    Fix: ratios must be measures, and columns use memory.

  • Mistake: Averaging a percentage column gives the overall percentage

    Fix: it gives the average of ratios.

Easy to hard

Questions interviewers ask, easy to hard

  1. How would you model a flat 40-column sales extract in Power BI?
  2. Measure or calculated column: when do you use each?
  3. Why does margin percentage give a wrong number as a column?
  4. How do you handle order date and delivery date in one model?

Explain it out loud

Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.

Practise by voice

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview