Forum Discussion
Utterly perplexed why I'm getting error messages when refreshing this model
- 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.
Hi masplin
If possible please upload the PBIX unzipped as a Power BI Project (.pbip) or export the model metadata via Tabular Editor's Model.bim or TMDL, We will check the semantic model and will find which object is causing the failure.
Thanks
C Srikanth.
Hi.
I have saved the PBIP here
As i mentioned this version only works because i have retained the old MSOA mapping query which is based on #"MSOA Mapping 2023 2011 basis" removed all the columns except the MSOA code which is the unique indetifier and then merged with the new version based on #"MSOA Mapping 2023 2021 basis". As far as i can tell there are exactly the same MSOA codes just different data columns. If i try to use the 2021 basis as the start of the query it throws all these errors.
FBergamaschi helpfuilly went through the model, but all he manged to prove is some of the calcauted columns cause circuilar references if you delete the relatioinships, but no idea which one. There are no ciruclar relationship warnings in the current model.
do you need me to put all the supporting files in the same folder so you can perform a refresh?
Thanks for your help