Forum Discussion
Clustered Column Using Inscope
- 8 months ago
Hi Anonymous ,
The reason you’re encountering this issue is that SELECTEDVALUE only returns a result when there’s a single item in context. If multiple cost centres are present, it returns blank, which is why you’re not seeing any values.
To address this, you can use HASONEVALUE in your measure. This approach checks if only one item exists at each level and then returns the appropriate BRAG value:
Total BRAG Norm = SWITCH ( TRUE(), HASONEVALUE('Cost Centres'[BU_LABEL]), MAX(SummarizedTableNorm[BU_TOTAL_BRAG]), HASONEVALUE('Cost Centres'[DIVISION_LABEL]), MAX(SummarizedTableNorm[DIV_TOTAL_BRAG]), HASONEVALUE('Cost Centres'[OM_LABEL]), MAX(SummarizedTableNorm[OM_TOTAL_BRAG]), HASONEVALUE('Cost Centres'[AREA_LABEL]), MAX(SummarizedTableNorm[BDM_TOTAL_BRAG]), HASONEVALUE('Cost Centres'[COST_CENTRE_LABEL]), MAX(SummarizedTableNorm[GM_TOTAL_BRAG]) )This should prevent blanks when slicing at higher levels. If you continue to see blanks at the cost centre level, consider adding a fallback aggregation such as MAXX or SUMX across cost centres to ensure the measure returns a value when multiple centres are involved.
I haven’t tested this in your specific model, so please use it as a starting point. If you continue to encounter blanks at the lowest level, consider adding a fallback aggregation such as MAXX or SUMX over the cost centres to address situations where multiple cost centres are included.
Let's give it a try and let us know how it goes.
Thank-you for the reply, it worked but needed to change the list so that COst centre was at the top and BU at the bottom. Was the last part of the puzzle and now can go live.
Thank-you again.
Thanks for the update. Stay engaged with the community for upcoming discussion