powerbidaxpowerquerymdatamodel

Is it good practice to remove unique ID columns in PowerBI datamodels?


I read in this article it is best to not have a unique ID column when building a data model in PowerBI because it is storage intensive as is n length and each value is unique.

  1. In reality, is this an industry agreed-upon principle and is it quicker to use functions on the reduced data model? Would this be through Dax or M?

  2. Is there a backend unique ID (alphanumeric column x row combinations?) or how does PowerBI link attributes in different data tables?


Solution

  • The guidance is only for large fact tables. The article actually says:

    "One common culprit is having a unique ID on fact tables. While this may be fine in the database layer, it should not be included in the data model unless it servers a concrete purpose (i.e. TransactionID for counting the number of transactions made)."

    In reality, is this an industry agreed-upon principle

    Yes. Including unnecessary columns is probably the most common mistake beginners make in Power BI Dataset design. It slows down refresh, wastes memory, slows down queries and makes report design harder.

    IDs on fact tables are typically not involved in relationships. The fact table links to dimension tables using the ID (Key) columns of the dimension tables, which are required to be in the model.