Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6866339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:10:15+00:00 2026-05-27T03:10:15+00:00

What is the reason that in measure fields in fact tables (dimensionally modeled data

  • 0

What is the reason that in measure fields in fact tables (dimensionally modeled data warehouses) NULL values are usually mapped as 0?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:10:16+00:00Added an answer on May 27, 2026 at 3:10 am

    Although you’ve already accepted another answer, I would say that using NULL is actually a better choice, for a couple of reasons.

    The first reason is that aggregates return the ‘correct’ answer (i.e. the one that users tend to expect) when NULL is present but give the ‘wrong’ answer when you use zero. Consider the results from AVG() in these two queries:

    -- with zero; gives 1.5
    select SUM(measure), AVG(measure)
    from
    (
    select 1.0 as 'measure'
    union all
    select 2.0
    union all
    select 3.0
    union all
    select 0
    ) dt
    
    -- with null; gives 2
    select SUM(measure), AVG(measure)
    from
    (
    select 1.0 as 'measure'
    union all
    select 2.0
    union all
    select 3.0
    union all
    select null
    ) dt
    

    If we assume that the measure here is “number of days to manufacture item” and NULL represents an item that is still being produced then zero gives the wrong answer. The same reasoning applies to MIN() and MAX() too.

    The second issue is that if zero is a default value, then how do you distinguish between zero as a default and zero as a real value? For example, consider a measure of “shipping charges in EUR” where NULL means that the customer picked up the order himself so there were no shipping charges and zero means the order was shipped to the customer for free. You can’t use zero to replace NULL without completely changing the meaning of the data. You can obviously argue that the distinction should be clear from other dimensions (e.g. shipping method) but that adds more complexity to reports and understanding the data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a specific reason that the EF requires new data providers and can't
Is there any particular reason that all data members in a class are private
I know that the reason that Microsoft came out with ASP.NET MVC was to
Is there any (technical) reason that C# requires all generic type parameters to be
What is the reason that in Java, a member with a protected modifier can
What is the specific reason that clone() is defined as protected in java.lang.Object ?
Is there a historic reason that periods are used instead of any other separator
Is there a reason that the object TreeSet.apply method returns SortedSet and not TreeSet
What is the reason that ASP.NET MVC templates are available only for Web Application
I'm wondering if there's a reason that there's no first(iterable) in the Python built-in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.