Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 months ago
Solved

Clustered Column Using Inscope

Hi all,  I have been asked to created a Clustered Column chart which is filtered based on a Slicer with a Hierarchy of the company.  The issue I have is that I am using inscope to return the max va...
  • V-yubandi-msft's avatar
    V-yubandi-msft
    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.