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.
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
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.
User | Count |
---|---|
98 | |
97 | |
81 | |
77 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |