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

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.

Reply
Hebj
Frequent Visitor

ALLSELECTED with multiple selection doesnt work

I want to create a table that lists all selected items in a slicer. When there is no item selected in the list I want to show "No Selection". I believe my problem is to get ALLSELECTED to return multiple records when there is more then one selected (ALLSELECTED works fine when only one record is selected - how come?).

(It is possible to accomplish this with Concate and [New line] characters, but then I need to have word wrap on for the table which makes a long string seem like several selected items which I dont want.

 

https://drive.google.com/file/d/1VRE7n-aCIWOArsO71kHXYwo52JBVFOu7/view?usp=sharing 

 

8 REPLIES 8
parry2k
Super User
Super User

@Hebj check this blog post which I wrote few days ago and see if this can help.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hebj
Frequent Visitor

Thanks for your suggestion. It seems very useful and Im sure I will use that in the future. But right now I want to show the selected values in a list - not concatenated.

@Hebj what you mean you wan to show selected value, if more than one value is selected, you have to show it as a concatenated string.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hebj
Frequent Visitor

It might be my limited understanding of DAX that is the problem, but to me it seems that the selection in the slicer is values from column: 'Dimension'[Value]. All I want to do is list these values in that column. So why isnt that possible? ALLSELECTED returns a table as I understand it - why cant I use that table to populate the table control? Ive been trying to google this question but I cant find any answer to that.

you can surely have list of those values but what you want to with those values. As you know allselected returns a table, either you can use that table in other measures or you can this to concatenate to show the list. Measures are always return scalar value. Question is how you want this allselected list to be used?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hebj
Frequent Visitor

I just realized my misunderstanding here... Of course - a measure can only return a scalar value. I need to think of another solution then. Thanks for taking your time!

@Hebj why not you put a table visual and choose one column Value in it, the table will show only these values which are selected int the slicer. Why that wouldn't work?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hebj
Frequent Visitor

I need to show "[Nothing selected]" when the user havent done a selection in the slicer. Im going to hide the slicers in a popup to save space on the page and when they are hidden I want to show lists of what the user have selected in one list per slicer. 9 times out of 10 the user hasent done a selection so the list normally only need to show 2 or 3 records while the slicers show 10 to 15 records to be usable, and it will be much clearer for the user if the list says [Nothing selected] instead of listing every record from the slicer. I dont want to go with the concatenated value since I believe a list will be much cleaner in the layout. If I have a concatenated value I need to make space so the user dont have to scroll if he/she selects several items.

Im thinking if it would be possible with a separate "Selection-table" containing the records from the slicer with an added "[Nothing selected]" row. Maybe I can build a measure that will do a selection on that table based on the key of the dimension records, adding a zero for the Nothing selected row.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.