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
mwen90
Helper III
Helper III

Filter across multiple columns one table

Hi, 

 

Thanks for the help.

 

I was looking to display a column of comments if the value "D" is displayed. The issue is, if I filter one column to show "D" then all other columns filter so I am missing out on values. 

 

How can I filter each column so it does't affect the others in my table or filter the whole table so only "D" shows and the corresponding commet?

 

Cheers,BI.PNG

6 REPLIES 6
v-yangliu-msft
Community Support
Community Support

Hi  @mwen90 ,

According to your description, I created an additional column water of [comment_ concreting_ comment_ true]:

v-yangliu-msft_0-1606727648466.png

 

Here are the steps you can follow:

1. Create measure.

switch_water_concreting_comment =
SWITCH(
    TRUE(),
    MAX('Table'[water_ concreting_ choice ])="D",MAX('Table'[water_concreting_comment_true]),
    MAX('Table'[water_concreting_Value]))

2. Result.

v-yangliu-msft_1-1606727648471.png

You can downloaded PBIX file from here.

If my answer is not what you need, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

 

Best Regards,

Liu Yang

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

v-yangliu-msft
Community Support
Community Support

Hi  @mwen90 ,

According to your description, I created some data to show:

v-yangliu-msft_0-1606462412292.png

Here are the steps you can follow:

1. Create measure.

switch_water_concreting_comment =
SWITCH(
    TRUE(),
    MAX('Table'[water_ concreting_ choice ])="D","Comments to output",
    MAX('Table'[water_concreting_Value]))

2. Result.

v-yangliu-msft_1-1606462412296.jpeg

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

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

Sorry, I am having issues with this solution. It is producing only 1 possible "D" answer, I want to see all of the "D" Comments in the column @v-yangliu-msft

Wow thank you all for the feedback and help!

I will try these now!

amitchandak
Super User
Super User

@mwen90 , Try one of the 4

 

if(max(table[water_concerting_choice]) = "D", max([water_concerting_comment]),blank())
or
if(max(table[water_concerting_choice])= "D", max([water_concerting_comment]),"")

or

calculate(max([water_concerting_comment]), filter(Table,table[water_concerting_choice]= "D"))

or
calculate(max([water_concerting_comment]), filter(Table,table[water_concerting_choice]= "D")) & ""

Sorry, am I meant to try all of these in one equation? or each line seperate?

The bottom to say we cannot convert "D" type text to a type Number @amitchandak

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.