Skip to main content

Power BI

Needs Votes

For a line (and scatter) charts with a legend allow conditional (DAX measure based) formatting

Vote (4) Share
Andrzej Leszkiewicz's profile image

Andrzej Leszkiewicz on 04 Dec 2020 12:21:56

When a legend is used with a line chart (Legend field is not empty) we need to change data color of each line manually.

This is against basic principles of good visualization and forces users to create spaghetti charts with too many visually conflicting lines. A good approach is, for example, to have all lines grayed out and only certain (e.g. selected) line colored. Currently it's possible only via workaround: an overlay of 2 charts and requires a lot of work. Allow to use DAX measure for data color (a measure will return different color depends on the data series). Ideally we also should be able to control stroke width using DAX measure.

Same approach will be useful for a scatter chart. If we have for example tens or hundreds of dots, it makes no sense to use a legend based on individual points (each dot has a different color). We need to be able to highlight individual dots or group of dots dynamically, using DAX measure.

Comments (3)
Andrzej Leszkiewicz's profile image Profile Picture

Andrzej Leszkiewicz on 04 Dec 2020 17:45:49

RE: For a line (and scatter) charts with a legend allow conditional (DAX measure based) formatting

If we have more than one line/dot/column/bar it's must be possible to control their format (at least color and data labels, also line width) using just one measure.

Andrzej Leszkiewicz's profile image Profile Picture

Andrzej Leszkiewicz on 04 Dec 2020 12:43:57

RE: For a line (and scatter) charts with a legend allow conditional (DAX measure based) formatting

When there are multiple lines/dots colors, shapes, labels should be used thoughtfully to highlight something important, not to make every dot/line different. We need to be able to control what lines/dots we're going to gray out and what lines/dots we're going to highlight (with a color, line width, data label).

Andrzej Leszkiewicz's profile image Profile Picture

Andrzej Leszkiewicz on 04 Dec 2020 12:37:35

RE: For a line (and scatter) charts with a legend allow conditional (DAX measure based) formatting

We also should be able to control data labels using DAX measure.