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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
samuelstinger
Frequent Visitor

Deneb Visual Legend Filtration during filtering

Hello all!

 

I have a some report with using Deneb Visual as replace a standard PowerBI Multiline Chart.

It`s works fine.

Normal stateNormal state

But there is a problem with the chart legend when I select the data in another visual.

 

Something wrongSomething wrong

 

Legend items are not filtered as expect. Selected item moved up, but another items still visible.

 

Does anyone know how to hide the filtered items in the legend.

Specification of  the Chart

 

 

{
  "data": {"name": "dataset"},
  "transform": [
    {
      "calculate": "datum['Brand']",
      "as": "dim"
    },
    {
      "calculate": "isDefined(datum['Brand'])?datum['Brand']:datum.dim",
      "as": "dim"
    },
    {
      "calculate": "isDefined(datum['Market Org'])?datum['Market Org']:datum.dim",
      "as": "dim"
    },
    {
      "calculate": "isDefined(datum['Rx/OTC'])?datum['Rx/OTC']:datum.dim",
      "as": "dim"
    },
    {
      "calculate": "isDefined(datum['Category'])?datum['Category']:datum.dim",
      "as": "dim"
    },
    {
      "calculate": "isDefined(datum['SKU'])?datum['SKU']:datum.dim",
      "as": "dim"
    }
  ],
  "encoding": {
    "x": {
      "field": "date",
      "type": "temporal",
      "axis": {
        "format": "MMM yyyy",
        "formatType": "pbiFormat"
      }
    },
    "y": {
      "field": "ac",
      "type": "quantitative",
      "axis": {
        "labelExpr": "format(datum.value,data('dataset')[0]['ExprType']=='SO'?',.3~s':(data('dataset')[0]['ExprType']=='MS'?'0.0%':'0'))"
      }
    },
    "color": {
      "field": "dim",
      "type": "nominal",
      "sort": {
        "field": "ac",
        "order": "descending"
      }
    }
  },
  "layer": [
    {"mark": {"type": "line"}},
    {
      "mark": {"type": "line"},
      "params": [
        {
          "name": "hover",
          "select": {
            "type": "point",
            "on": "pointerover",
            "clear": "pointerout"
          }
        }
      ],
      "encoding": {
        "size": {
          "condition": {
            "test": {
              "param": "hover",
              "empty": false
            },
            "value": 4
          },
          "value": 1
        },
        "tooltip": [
          {
            "field": "date",
            "type": "temporal",
            "format": "MMM yyyy",
            "formatType": "pbiFormat"
          },
          {
            "field": "dim",
            "type": "nominal"
          },
          {
            "field": "ac",
            "type": "quantitative",
            "format": ",.3~s"
          }
        ]
      }
    }
  ]
}

 

 

Config

 

 

{
  "autosize": {
    "type": "fit",
    "contains": "padding"
  },
  "axisX": {
    "grid": true,
    "ticks": false,
    "domain": false,
    "title": false
  },
  "axisY": {
    "grid": true,
    "labels": true,
    "ticks": true,
    "domain": false,
    "title": false,
    "offset": 0
  },
  "legend": {"title": false}
}

 

 

Thanks!

1 ACCEPTED SOLUTION
samuelstinger
Frequent Visitor

I will answer myself.

 

Deneb doesn't fully match selection behavior like PowerBI does.

For fix this need go to Options and settings > Options > Report Settings and check this

"Change default visual interaction from cross highlighting to cross filtering".

 

deneb_3.pngAt least it helped in my case!

 

Thanks for your attention!

View solution in original post

1 REPLY 1
samuelstinger
Frequent Visitor

I will answer myself.

 

Deneb doesn't fully match selection behavior like PowerBI does.

For fix this need go to Options and settings > Options > Report Settings and check this

"Change default visual interaction from cross highlighting to cross filtering".

 

deneb_3.pngAt least it helped in my case!

 

Thanks for your attention!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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