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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Magellan2022
Helper I
Helper I

Deneb Visuals Cross-Filtering Only One Way

Hello,

 

I've created two Deneb visuals starting out with a simple bar-chart with the same measures used in each but each with different granularities. One is at a Team level category and the other is at a Contributor level category. I have a Power BI table visual that is being cross-filtered when a bar is selected from either one of the Deneb visuals. However when selecting a row in the table visual, the cross-filtering doesn't execute/impact the other two Deneb visuals. Also, a Deneb visual won't cross-filter the other Deneb visual or vice versa...only the table visual is being cross-filtered.

 

The Power BI Interactivty settings of both Deneb visuals are all checked and the data point limit is set to 250 and no warnings are appearing either.

 

Below is the Vega-lite code that I'm using if it helps...

{
  "data": {"name": "dataset"},
  "width": {"step": 60},
  "params": [
    {"name": "bwActual", "value": 0.8},
    {"name": "bwDelta", "value": 0.4},
    {"name": "bwTick", "value": 1},
    {
      "name": "MeasureVar",
      "value": "datum['Variance']"
    }
  ],
  "transform": [
    {
      "calculate": "datum['Actual'] >= datum['Budget']",
      "as": "delta_positive"
    },
    {
      "calculate": "datum['delta_positive'] ? '#BAD9B1':'#E3BFBF'",
      "as": "delta_bar_color"
    },
    {
      "calculate": "datum['delta_positive'] ? 'bottom': 'top'",
      "as": "actual_label_baseline"
    },
    {
      "calculate": "datum['delta_positive'] ? 'black': 'white'",
      "as": "actual_label_color"
    },
    {
      "calculate": "datum['delta_positive'] ? -4: 4",
      "as": "actual_label_offset"
    }
  ],
  "layer": [
    {
      "mark": {
        "type": "bar",
        "width": {
          "expr": "bandwidth('x') * bwActual"
        },
        "tooltip": true,
        "style": "bar_actual"
      },
      "encoding": {
        "y": {
          "field": "Actual"
        },
        "opacity": {
          "condition": {
            "test": {
              "field": "__selected__",
              "equal": "off"
            },
            "value": 0.3
          },
          "value": 1
        },
        "tooltip": [
          {"field": "Team","type":"nominal"},
          {"field": "Budget","type":"quantitative"},
          {"field": "Actual","type":"quantitative"},
          {"field": "Variance","type":"quantitative"}
          ]
      }
      },
    {
      "description": "Budget Delta Bar",
      "mark": {
        "type": "bar",
        "width": {
          "expr": "bandwidth('x') * bwDelta"
        },
        "xOffset": {
          "expr": "(bandwidth('x') * (bwActual - bwDelta))/2"
        },
        "opacity": 1,
        "tooltip": true,
        "color": {
          "expr": "datum['delta_bar_color']"
        }
      },
      "encoding": {
        "y2": {
          "field": "Budget"
        },
        "tooltip": [
          {"field": "Team","type":"nominal"},
          {"field": "Budget","type":"quantitative"},
          {"field": "Actual","type":"quantitative"},
          {"field": "Variance","type":"quantitative"}
          ]
      }
      
    },
    {
      "description": "Gross Profit Budget Tick",
      "mark": {
        "type": "tick",
        "orient": "horizontal",
        "tooltip": true,
        "color": "orange",
        "opacity": 1,
        "thickness": 3,
        "width": {
          "expr": "bandwidth('x') * bwTick"
        }
      },
      "encoding": {
        "y": {
          "field": "Budget"
        },
        "tooltip": [
          {"field": "Team","type":"nominal"},
          {"field": "Budget","type":"quantitative"},
          {"field": "Actual","type":"quantitative"},
          {"field": "Variance","type":"quantitative"}
          ]
      }
    }
  ],
  "encoding": {
    "x": {
      "field": "Team",
      "type": "nominal",
      "axis": {"title": null}
    },
    "y": {
      "field": "Actual",
      "type": "quantitative",
      "axis": {"title": null}
    }
  }
}

 

1 ACCEPTED SOLUTION
Magellan2022
Helper I
Helper I

Figured it out...the Edit interactions was the solution. Can't believe I missed that.

View solution in original post

1 REPLY 1
Magellan2022
Helper I
Helper I

Figured it out...the Edit interactions was the solution. Can't believe I missed that.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors