Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi all,
I have defined 2 measures with the following DAX code ('Huidig Jaar' means 'Current Year' and 'Vorig Jaar' means 'Last Year'):
Graaddagen Huidig Jaar = IF( CONTAINS(xGraaddagenOnOff; xGraaddagenOnOff[Graaddagen On/Off]; "On"); CALCULATE( SUM(WeatherMeasurements[GewogenGraaddagen])/24; FILTER(DimDate; YEAR(DimDate[DATUM]) = YEAR(NOW()) ) ); IF( CONTAINS(xGraaddagenOnOff; xGraaddagenOnOff[Graaddagen On/Off]; "Off"); BLANK() ))
Graaddagen Vorig Jaar = IF( CONTAINS(xGraaddagenOnOff; xGraaddagenOnOff[Graaddagen On/Off]; "On"); CALCULATE( SUM(WeatherMeasurements[GewogenGraaddagen])/24; FILTER(DimDate; YEAR(DimDate[DATUM]) = YEAR(NOW()) - 1) ); IF( CONTAINS(xGraaddagenOnOff; xGraaddagenOnOff[Graaddagen On/Off]; "Off"); BLANK() ))
Subsequently I have built a filter, that allows for switching on/off the 2 corresponding lines in a 'Line and clustered column chart' according to this example. This works for the 2 lines.
But consequently the 2 legend items for these 2 measures should also switch on/off accordingly, but weirdly enough it only switches off the legend item for the measure 'Graaddagen Huidig Jaar', but not the legend item for the measure 'Graaddagen Vorig Jaar' (again, see attachments). Below you also find some screenshots which portray what is the case.
Does anyone have any idea how to fix it in such a way, that both measures are indeed not visible when they are being switched off through the filter? Thank you very much in advance!
Hi @Anonymous,
In my test, everything works fine. Both of the two lefend items are visible/invisible together when I switch between ON and OFF option from the slicer. Since I cannot reproduce your scenario, would you please share your pbix file so that I can check for you?
This behavior is very odd, have you ever tried to close and reopen your report or recreated a new one to see whether issue persisted?
Regards,
Yuliana Gu
I have tried closing and reopening it, switching from direct query to import mode, different machines...in all situations, the problem persists.
Do you have a direct e-mail address? Then I can send you the direct query version of the pbix, without the database credentials.
Hi @Anonymous,
Here is my e-mail address: v-yulgu@microsoft.com. You can send me your .pbix file for further analysis.
Regards,
Yuliana Gu
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
117 | |
84 | |
49 | |
38 | |
28 |
User | Count |
---|---|
188 | |
76 | |
73 | |
54 | |
42 |