TGViewer
Data Analytics Data Analytics @sqlspecialist ยท 111K subscribers
Post #3122 2.92K
This makes time-based analysis much easier.

๐Ÿ”น 12. Why Month Number Is Important

If you display:

January

February

March

April

Power BI may sort month names alphabetically depending on the setup.

You need a:

Month Number

January โ†’ 1

February โ†’ 2

March โ†’ 3

Then sort Month by Month Number.

๐Ÿ”น 13. Understand the Grain

Before creating relationships, ask:

"What does one row represent?"

For example:

Sales table

โ†’ One row = One order

or:

Sales table

โ†’ One row = One order item

These are different grains.

If you don't understand the grain, you can accidentally double-count sales.

๐Ÿ”น 14. Example of a Grain Problem

Suppose one order contains:

Order 1001

Laptop โ†’ โ‚น60,000

Mouse โ†’ โ‚น2,000

The order-item table has two rows.

If you join this with another table incorrectly, the โ‚น62,000 order value could potentially be repeated.

So before creating relationships or calculations:

Always understand the grain of your tables.

๐Ÿ”น 15. Active and Inactive Relationships

Sometimes two tables can have more than one possible relationship.

For example, Sales may contain:

Order_Date

Ship_Date

Both could connect to the Date table.

But Power BI generally allows only one active relationship between the same pair of tables at a time.

The other relationship can be inactive and activated when needed using DAX.

This becomes important when building advanced date analysis.

๐Ÿ”น 16. Filter Direction

Relationships control how filters move between tables.

In a simple star schema:

Customer

โ†“

Sales

filters usually flow from the dimension toward the fact table.

Avoid using bi-directional filtering everywhere.

It can create:

โ€ข Ambiguous relationships

โ€ข Unexpected results

โ€ข Difficult-to-debug models

โ€ข Performance issues

๐Ÿ”น 17. Don't Create Relationships Just Because Column Names Match

For example:

Customer_ID

appearing in two tables doesn't automatically mean they should be connected.

Check:

โœ” Same business meaning

โœ” Compatible data type

โœ” Correct grain

โœ” Unique values on the "one" side

โœ” Correct cardinality

๐ŸŽฏ Interview Question

What is the difference between a Fact Table and a Dimension Table?

Fact Table

Contains business transactions and measurable values.

Example:

"Sales, Quantity, Cost"

Dimension Table

Contains descriptive information used to analyze those transactions.

Example:

"Customer, Product, Date, Region"

Easy way to remember:

Fact = What happened

Dimension = Describe what happened

๐Ÿ’ก Key Lesson

Don't build your Power BI visuals before understanding your data model.

A good model makes your calculations easier, your reports more reliable, and your analysis much easier to maintain.

๐Ÿš€ Double Tap โค๏ธ For More
  • โค 9
More from @sqlspecialist
  1. Oct 4, 20269๏ธโƒฃ How would you calculate month-over-month growth? Sample Answer: โ€œI would first retrievโ€ฆ
  2. Oct 4, 2026๐Ÿ“Š Data Analyst Interview Series โ€” Part 3 Guys, let's continue our Data Analyst Interviewโ€ฆ
  3. Sep 29, 2026๐Ÿ”Ÿ How would you find duplicate records in SQL? Sample Answer: "I would first identify theโ€ฆ
  4. Sep 29, 2026๐Ÿ“Š Data Analyst Interview Series โ€” Part 2 Guys, let's continue our Data Analyst Interviewโ€ฆ
  5. Sep 29, 2026๐—™๐—ฅ๐—˜๐—˜ ๐—ฅ๐—ฒ๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ๐˜€ ๐—ง๐—ผ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป ๐—”๐—œ ๐—ถ๐—ป ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ๐Ÿš€ โ€‹ Explore 6 free resourceโ€ฆ
  6. Sep 29, 2026"After identifying duplicates, I investigate whether they are genuine duplicate records orโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’