Forum Discussion

FabianHolm's avatar
FabianHolm
New Member
10 months ago
Solved

Modelling

Hi all, I’m working with a semantic model provided by our data engineers and trying to extend it using a composite model in Power BI. Here’s the setup: I’m importing a dimension table I created ...
  • Royel's avatar
    10 months ago

    Hi  FabianHolm  seems like the relationship beteen MaterialDim to FactTable is not set properly. As its a dimension and Fact table relationship if possible try to make it 1 to many.

     

    If i implement your model with same sample data it will be look like this 

    Here: Relationships are 

    ESG[CatNum] = MaterialDim[CatNum] 

    MaterialDim[Key] = FactTable[Key]

     

    Measure: 

    MyVal1 = CALCULATE(SUM(FactTable[Val1]), FILTER(ESG, ESG[Name] = "Cat1"))

    Results: 

     

    As you can see i got 13 (11 + 2) for Cat1 which is correct. 

     

    Idea:

    • Keep 1-1 relationship between ESG and MaterialDim 
    • Make sure MaterialDim (Key) column is unique and relationship is 1 to many (ideal) 

     

    Let me know what is the different situation you have? 

    Thanks