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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

0

Custom Label for Data Label not working on PowerBI Service

Hello all, we are trying to show/hide the Data Label using a column with the definition below:

 

Display custom label = IF(
    MOD(financials[Month Number], 2) = 0
    , " "
)

 

 

This [Display custom label] field is being assigned to the field of Custom label in the Data Label visual of a chart.

CCLiew_0-1688552013123.png

 

I created an MRE (Minimal Reproducible Example) using the sample dataset (financials) provided by PowerBI to reproduce this issue and below is the result.

 

At the right side, it works fine on my PowerBI Desktop - Version: 2.118.828.0 64-bit (June, 2023).

However, when we publish to PowerBI Service, it is not showing the Data Label (at the left).

custom-label-not-showing.png

 

We could not provide the value for the False condition due to some constraints, but that is an optional field, the PowerBI Service should work like the one in the PowerBI Desktop.

 

This is the MRE: https://filebin.net/aoot6la1vnl4quvl

 

Any workaround or solution for this?

Thanks.

Status: Delivered

Hi @Anonymous ,

 

This fix has been rolled out to service and will be in the future version of desktop. 
As a workaround:
You may update the DAX expression so it returns the field you would like to display when the condition is false. This will address your issue. 

For example:

Display custom label = IF(
    MOD(financials[Month Number], 2) = 0

    , " "

, financials[Gross Sales]

)
 
Best regards.
Community Support Team_Caitlyn
Comments
AnkitKukreja
Super User

For one of my client the workaround to use a "Line and stacked column chart" worked instead of using a "Line and clustered column chart" which was showing the same issue in service that is being reported here.

Afives522
Frequent Visitor

@AnkitKukreja is yours working properly in PBI Service?

The sample of @migbenp is using stacked, and same with mine, Line and stacked column chart but also not working in PBI service.

AnkitKukreja
Super User

Hi @Afives522 

 

Yes that worked for my client in Service.

migbenp
New Member

Now, I´ve reinstalled once again "Version: 2.121.903.0 64-bit (September 2023)" and it´s working in web service. Maybe this release has this bug fixed. For me, I´m done.  Thanks

 

migbenp_0-1696906661998.png

This a web view

R27878
Regular Visitor

Hi @migbenp !

 

A reinstalled too, with the same version, but nothing changed in web service.

 

R

Anonymous
Not applicable

I have also tried to reinstall with the suggested version and its still not working

j_pereira
New Member

I'm having the exactly same issue.

 

Desktop:

j_pereira_0-1697574246888.png

 

Online:

j_pereira_1-1697574288698.png

So far, custom labels are being useless if they are not shown in PBI Services.

 

R27878
Regular Visitor

New version, with same problem. @migbenp the PBI team still working on it?

R27878_0-1697613484026.png

 

j_pereira
New Member

It seems the problem is fixed everyone. 

 

The custom data labels magically appeared in my dashboard.

j_pereira
New Member

That was so good to be true...

 

New problem: at my desktop, the label works fine. But in the PBI Services my custom label is replaced by the axis value.

 

Desktop:

j_pereira_0-1702653933395.png

Service:

j_pereira_1-1702653953640.png

 

Is anyone facing the same?