Forum Discussion
Filtering the Stacked Column Chart
- 1 year ago
You have to aplly All filter on different table where you calculted measure is created.
I hope This might help!
In Power BI, slicers typically affect all visuals on a page that share relationships with the slicer’s field. To isolate the effect of a slicer to only specific columns or datasets in a chart, you need to:
• Use DAX measures instead of raw fields.
• Leverage relationships or `USERELATIONSHIP` to control filtering.
2. Steps to Implement
Step 1: Ensure Proper Data Modeling
• If your two datasets are in separate tables, ensure they are related through a common key (e.g., Date, Product ID). If no relationship exists, create one in the Model View.
• If both datasets are in the same table, ensure the columns you want to filter are clearly distinguishable.
Step 2: Create Separate Measures for Each Dataset
Instead of directly using columns from your datasets in the chart, create measures for each dataset. For example:
Measure_Dataset1 =
CALCULATE(
SUM('Dataset1'[Value]),
ALL('Dataset2') -- Ignores Dataset2 filtering
)
Measure_Dataset2 =
CALCULATE(
SUM('Dataset2'[Value]),
ALL('Dataset1') -- Ignores Dataset1 filtering
)
Step 3: Add Slicer and Control Filtering
• Add a slicer to your report using a field from `Dataset1` (or whichever dataset you want to control).
• Use `Edit Interactions` (found under the “Format” tab) to ensure that the slicer only affects visuals tied to `Dataset1`. This prevents it from influencing visuals tied to `Dataset2`.
Step 4: Use Measures in Stacked Column Chart
• Add `Measure_Dataset1` and `Measure_Dataset2` as values in your Stacked Column Chart.
• Assign appropriate legends or categories for each measure.
hope this helps
thanks