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.
I'm facing an issue with Legends in PowerBI, where it is working as expected in PowerBI Desktop whereas it is not on PowerBI service. I believe something has changed recently as it was working perfectly previously.
I've created a sample report to highlight the issue. Here is the query used -
select *
from
(
select 'A' AS Typ, CAST('2017-04-21' AS Date) AS Dt, 10 As X, 20 AS Y, NULL AS Z
union all
select 'A' AS Typ, CAST('2017-04-22' AS Date) AS Dt, 15 As X, 20 AS Y, NULL AS Z
union all
select 'A' AS Typ, CAST('2017-04-23' AS Date) AS Dt, 18 As X, 20 AS Y, NULL AS Z
union all
select 'A' AS Typ, CAST('2017-04-24' AS Date) AS Dt, 22 As X, 20 AS Y, NULL AS Z
union all
select 'A' AS Typ, CAST('2017-04-25' AS Date) AS Dt, 19 As X, 20 AS Y, NULL AS Z
union all
select 'B' AS Typ, CAST('2017-04-21' AS Date) AS Dt, NULL As X, 20 AS Y,23 AS Z
union all
select 'B' AS Typ, CAST('2017-04-22' AS Date) AS Dt, NULL As X, 20 AS Y,18 AS Z
union all
select 'B' AS Typ, CAST('2017-04-23' AS Date) AS Dt, NULL As X, 20 AS Y,15 AS Z
union all
select 'B' AS Typ, CAST('2017-04-24' AS Date) AS Dt, NULL As X, 20 AS Y,22 AS Z
union all
select 'B' AS Typ, CAST('2017-04-25' AS Date) AS Dt, NULL As X, 20 AS Y,10 AS Z
) a
In PowerBI desktop , when I select A as Typ, it only shows X and Y in the Legend. (which is expected)
however on the PowerBi Service, the same report with same slicer selected shows all the legends namely X,Y and Z. here is the snapshot -
thanks
Sid
I've got response from the Product Team.
The previous behavior was incorrect, and this is by design. When you create a legend by using multiple values, all values are always supposed to show up in the legend.
Best Regards,
Herbert
Hi Herbert,
The previous feature seems to be working for the scenario where either of the values can be present. (not both).
Our production dashboards were working properly using the previous feature and working properly. however it is not with these changes .
thanks
Sid
Hi @siddhartha,
Which version of Power BI Desktop do you use? I test your scenario in the latest version of Power BI Desktop(Version: 2.46.4732.461 64-bit (May 2017)), when I select A in Typ slicer, it also shows X,Y and Z in the Legend, which acts like that in Power BI Service.
Thanks,
Lydia Zhang
Hi Lydia,
I'm using Power BI Desktop Version - 2.45.4704.442 64-bit (April 2017). I can update to the latest version, however for this particular feature, I believe the April version was a better represntation. The reason being, if I do not see any data points related to the specific legend, there is no point of showing it either.
Thanks
Sid
Hi @siddhartha,
I will report this issue internally and post back once I get any updates.
Thanks,
Lydia Zhang
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.