user21675773
user21675773

Reputation: 1

How to show less data labels but label for all data series in Power BI?

I tried to show the data label for the current date only, and also to show data labels for all series (lines) even if some data value is 0%. I tried to use 0 label density but still get very messy looking - different series showed date labels in different dates, and at the end, not all the series had data value labeled. I noticed that someone recommended to create a new measure for current date for each line that could overlay the original chart, but it was not practical to us since we have 40+ charts and most the fields were created by complicated measures.

Is there any way to show less label density but also show labels for all series? OR, is there a way to show a legend table including the field value from the current date for those calculated measure? (Please note the example I attached was exported data value only that calculated by measures. If I show a table by picking up the measures from the current date, the measure will recalculate and the number will be wrong) Please see attached example. https://github.com/dgao95/Share-to-public/blob/main/Example%201%20Label%20issue.pbix

Thanks, DG

Upvotes: 0

Views: 2856

Answers (1)

Biju jose
Biju jose

Reputation: 273

On power bi 2.116.622.0 version, So the OP wants to show only the last value in the label for that we will create a new measure which will only have the last value in it Note I have renamed the table name to Fact for easy understanding.

enter image description here

Line Label Measure = 
var max_label = CALCULATE(MAX(fact[cycle_date]), ALL(fact))

RETURN
IF(
    OR(
        MAX(fact[cycle_date]) = max_label,
        MIN(fact[cycle_date]) = min_label,
    ),
    SUM('fact'[A])
)

The same way you have to create rest of the measures (B-I) Once created add it to the Y-Axis

enter image description here

Now you have to play around with the labels

1.First reset the Data labels to make sure no other settings is there

2.Turn off the label for only SUM of A

enter image description here

3.Now turn on the visual for newly added measure (Line label Measure)

enter image description here

This will add only the last data point for this measure,

enter image description here You can update the same color for both measures to make it seamless.

Source

Upvotes: 0

Related Questions