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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
yellow_old_5
Helper II
Helper II

Display all values in table

Hi everyone, i need help with this,

i have slicer with diffrent categories like fruit, vegetables and meat,

when i select fruit in slicer it will display all fruit i have in friut column,

my dax looks like:
switch(True()),
selectedvalue(categories)="fruit",Values(fruit))
then i got a error message like:
A table of multiple values was supplied where a single values was expected

5 REPLIES 5
PijushRoy
Super User
Super User

@yellow_old_5 

Please share sample data or image for your data structure

Hi @yellow_old_5 

Go to Power Query editor
Select the all column & Unpivot it
0.JPG

 

Load the Data, Remove created measure. 
Create Relationship lick below

01.JPG

 

Use the slicer to get resulted data

02.JPG

 

Keep the same spelling for Vegetable in both table

 

If solve your requirement, please mark this answer as SOLUTION
If this comment helps you, please LIKE this comment/Kudos

it is possible to not pivot it and have it as it is? i want to have as measure if possible

 

Hi @yellow_old_5 ,

 

You could consider unpivot, which is a better model for creating reports.


Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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