Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Ignore Slicer selections for one bar in stacked bar chart

Hi , 

I am trying to ignore a slicer selections for one bar in a graph which shows the national average. 

I created a table and measure and created relationship by which i am able to get the avg into the field . 

Here is the dax measure below which is not working . Please help 

I need the avg to be shown in the X axis along with territory , It is showing currently , when i select area or region it disappears

 

 Avg Terr = VAR _selected = SELECTEDVALUE(Territory[TERR_NAME])

VAR _result = IF(

    _selected = "Avg.",CALCULATE(AVERAGEX(SUMMARIZE('Lookup_Table','Lookup_Table'[Use Case],"toAverage",[Suggestions_SalesAlert]),[Suggestions_SalesAlert]), ALLEXCEPT('terr_hier_ csv','terr_hier_ csv '[Area]),

        USERELATIONSHIP('terr_hier_csv'[TERR_NAME],Territory[TERR_NAME])),

    CALCULATE(AVERAGEX(SUMMARIZE('Lookup_Table','Lookup_Table'[Use Case Latest],"toAverage",[Suggestions_SalesAlert]),[Suggestions_SalesAlert]),

           Territory[TERR_NAME] = _selected)

)

RETURN _result

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

The problem seems to be related to the interaction between slicers and visuals. When you select an area or region, the measure behaves unexpectedly.

To achieve your goal, consider creating an unrelated table that lists all available city names. This way, when you choose any value from the slicer, the table visual won’t be filtered by it.

You can also try this DAX:

// Measure to always show national average
National_Avg = CALCULATE(
    AVERAGEX(SUMMARIZE('Lookup_Table', 'Lookup_Table'[Use Case], "toAverage", [Suggestions_SalesAlert]), [Suggestions_SalesAlert]),
    ALL('terr_hier_csv')
)

// Measure that responds to slicer selections
Selected_Territory_Avg = CALCULATE(
    AVERAGEX(SUMMARIZE('Lookup_Table', 'Lookup_Table'[Use Case Latest], "toAverage", [Suggestions_SalesAlert]), [Suggestions_SalesAlert]),
    Territory[TERR_NAME] = _selected
)

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

The problem seems to be related to the interaction between slicers and visuals. When you select an area or region, the measure behaves unexpectedly.

To achieve your goal, consider creating an unrelated table that lists all available city names. This way, when you choose any value from the slicer, the table visual won’t be filtered by it.

You can also try this DAX:

// Measure to always show national average
National_Avg = CALCULATE(
    AVERAGEX(SUMMARIZE('Lookup_Table', 'Lookup_Table'[Use Case], "toAverage", [Suggestions_SalesAlert]), [Suggestions_SalesAlert]),
    ALL('terr_hier_csv')
)

// Measure that responds to slicer selections
Selected_Territory_Avg = CALCULATE(
    AVERAGEX(SUMMARIZE('Lookup_Table', 'Lookup_Table'[Use Case Latest], "toAverage", [Suggestions_SalesAlert]), [Suggestions_SalesAlert]),
    Territory[TERR_NAME] = _selected
)

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.