Forum Discussion

masplin's avatar
masplin
Impactful Individual
1 month ago
Solved

Utterly perplexed why I'm getting error messages when refreshing this model

I've spent 3 days on this tryingh everything and cannot get past this so hoping someone cleverer than me can explain what is happening.   I have a complicated model that maps demopgraphic data for ...
  • v-csrikanth's avatar
    1 month ago

    Hi masplin 
    Please check the below points.
    IncomeGroup[Min]/[Max] call the measures [Total Population] and [Av annual Net Income], which scan all of MSOA_Mapping including [Income Group]/[Income Tgt], which are built from Min/Max. That loop is what breaks the rebuild.

    Three quick edits fix it:

    1. Add a plain column: MSOA Population = CALCULATE ( SUM ( 'Age by MSOA'[Population] ), 'Age by MSOA'[Year] = 2024 )

    2. In Min and Max, replace the AVIncome VAR (drop the measures):
    VAR AVIncome =
    DIVIDE (
    SUMX ( MSOA_Mapping, MSOA_Mapping[MSOA Population] * MSOA_Mapping[Net annual income after housing costs (£)] ),
    SUMX ( MSOA_Mapping, MSOA_Mapping[MSOA Population] ),
    BLANK ()
    )
    Keep the rest of Min/Max unchanged same result.


    3. Set MSOA_Mapping[LA Name] → Property[LA_name] to single-direction (keep it Active).

    Note: never call a measure inside a calculated column on a table that measure scans.

    Make those three changes and refresh sorted.

    Thank you.