Forum Discussion

wildrose2023's avatar
wildrose2023
Frequent Visitor
1 year ago
Solved

Hierarchy Modelling for SellOut Data

Hi everyone,   I'm looking for some input on the following modeling concept. The idea is pretty straightforward: we receive SellOut data from different providers—one file contains data at the SKU ...
  • v-priyankata's avatar
    1 year ago

    Hi wildrose2023 
    Thank you for sharing your detailed explanation and diagram. You’ve clearly put a lot of thought into modeling your SellOut data for both additive and non-additive measures.

     

    Additive Measures:
    Your approach of using a blank row to store the “missing” SKU-level data to align with the brand-level source of truth makes sense. This ensures that simple aggregations work cleanly without extra DAX complexity.

     

    Non-Additive Measures:
    For weighted distributions (non-additive), your method of reverse-calculating the blank row’s value so that the overall brand-level measure aggregates to the correct average also looks solid. This technique ensures that the final brand-level WD aligns with the trusted brand-level file.

     

    Regarding Databricks (or Spark-based environments):
    In principle, the calculation logic for the blank row (reverse-calculating the missing piece) is the same, regardless of the underlying platform (Power BI, Databricks, etc.). The challenge in Databricks would typically be to replicate the dynamic calculation of that blank row’s value in PySpark or SQL. However, if you pre-calculate and stamp the value in your ETL layer (as your diagram suggests), you’d avoid runtime complexity in the query layer same as in Power BI.

     

    If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently. Thank you.