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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
PowerKoen
Frequent Visitor

Show multiple values in table/matrix

Hi there,

 

Got an table sales with the following columns:

 

Sales[ID]

Sales[Names]

 

In an matrix/table visual i want to show the following:

 

IDNames
1No name
2April
3Ben

 

 

IF, the filter ID (on filter pane) has an selected value it must show ALL the values of sales[names]. 

But when no ID ( on filter ) is selected, it must show ALLEXCEPT the value 'no name' of sales[names]

 

I tried the following:

 

IF ( hasonevalue sales[ID], 
calculate ( allselected sales[names] , ALL ( sales[names]) ,
calculate ( allselected sales[names],  'all other columns, except no names' )

And all in between, with values and selected, but its not working.

 

Can anybody help? 

 

4 REPLIES 4
V-pazhen-msft
Community Support
Community Support

@PowerKoen 

1. once you select a value for example 2 in the filter panel, the table visual automatic shows the Name that corresponding to ID 2. It is impossible to show all names. 

2. when no ID is selected in the panel, the table visual shows all name in table. It is not possible to achieve your demand of remove "no name" from the list.

 

BTW, this measure removes "no name" from the list :
measure= CALCULATE(MAX('Table'[Names]),FILTER('Table','Table'[Names]<>"No Name"))


Or I misunderstood your question,  maybe provide an image view of your expected result.

 

Paul Zheng

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

Thanks for your anwser, and yes I think I need to elloborate more.

 

In the table/matrix, when NO ID is selected. It must show all but not 'no name'.

Can maybe do this with 

measure= CALCULATE(MAX('Table'[Names]),FILTER('Table','Table'[Names]<>"No Name"))

But when an ID is selected (in filter pane), it must show ALL, so also 'no name' values.

 

Tried combining the measurement with selected / hasonevalue etc, but no succes so far. 

@PowerKoen 

 

Unfortunately, after a plenty of research and tests it is still impossible to do that.

BTW, I don't see the logic of your use of filter to see all values, because filter is used to see the specific values. 

 

My suggestion would be make your model like the follow:

1. when NO ID is selected. It show all include "no name"

2. create a  flag for Name column, using "Name" and "No Name", when "Name" is selected show all names except "no name".

2.JPG

 

Best, regards

Paul Zheng

 

Greg_Deckler
Super User
Super User

Where are you showing the names, in the rows of the matrix? Seems like you could just FILTER [Name] <> "No name"? Can you provid an example of the expected output in both cases? Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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