Forum Discussion
Add a selectable legend to multiple Y-axis series chart ?
- 3 years ago
Ok so i was able to figure it out, here's how you can modify the previous DAX to include for multiple selections :
Value1 = IF ( LASTNONBLANK ( 'Select'[Select], 1 ) = "Value1", LASTNONBLANK ( 'total per row'[expected], 1 ), IF ( CONTAINS(ALLSELECTED('Select'[Select]), [Select], "Value1"), LASTNONBLANK ( 'total per row'[expected], 1 ), BLANK () ) )Basically saying, display Liner Value 1 if it's the lastnonblank or if it's in the list of selected filters for the select column category.
Could probably get rid the first if conditional imo, but was just trying to quickly fix the problem.
Hopefully this helps anyone that goes through same problem in the future.
I have found this topic which offers the closest solution to my use case : Solved: Line chart slicer - Microsoft Power BI Community
Currently, when selecting multiple filters at once, only one liner displays, instead i would like to have every selected filter display the corresponding liner.
I have the multi-select option enabled on the slicer settings :
This has to do with the following DAX request :
Value1 =
IF (
LASTNONBLANK ( 'Select'[Select], 1 ) = "Value1",
LASTNONBLANK ( 'total per row'[expected], 1 ),
IF (
ISFILTERED ( 'Select'[Select] ) = FALSE (),
LASTNONBLANK ( 'total per row'[expected], 1 ),
BLANK ()
)
)
Essentially how to modify the previous query, to allow for multiple filtering to display all the selected liners at once ?
- r4v3n3 years agoNew Member
Ok so i was able to figure it out, here's how you can modify the previous DAX to include for multiple selections :
Value1 = IF ( LASTNONBLANK ( 'Select'[Select], 1 ) = "Value1", LASTNONBLANK ( 'total per row'[expected], 1 ), IF ( CONTAINS(ALLSELECTED('Select'[Select]), [Select], "Value1"), LASTNONBLANK ( 'total per row'[expected], 1 ), BLANK () ) )Basically saying, display Liner Value 1 if it's the lastnonblank or if it's in the list of selected filters for the select column category.
Could probably get rid the first if conditional imo, but was just trying to quickly fix the problem.
Hopefully this helps anyone that goes through same problem in the future.
- v-chenwuz-msft3 years ago
Community Support
Hi r4v3n ,
Thanks for your sharing, please mark your reply as the solution, so that others can find it quickly.
Best Regards
Community Support Team _ chenwu zhu