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
Ahead4097
Helper I
Helper I

Filter Help Needed

Hello Everyone,

I'm needing some help with a filter function. Currently, the below formula is counting the responses in the column "Response Text". 

What I'm needing is for the formula to return the response in the "Response Text" column, not the count.

I realize I'm using the wrong DAX formula, I just used Count as an example. I need it to filter the responses by the two filters below, just return the actual text that is in the "Response Text" column. I'm just not sure which DAX formula to use that will return the actual text. 

All of the columns are text columns...if that matters.

 

FilterFilter

 

Any help is greatly appreciated! 

1 ACCEPTED SOLUTION

Thanks for the help everyone. 

I was able to figure out the solution by playing around with it for a bit. 

photophoto

To return the specific responses to the table, I just needed to use FIRSTNONBLANK. That allows me to apply whatever filters needed, and returns the first response. 

View solution in original post

6 REPLIES 6
venkatasuresh_g
Helper III
Helper III

Hi,

 

 If I am understanding right, you want to see the Resposnse text when the conditions in Question and Subject match. In simlar situation where I need to eliminate few records  for Q2 but not in other Quarters , I created a Filter field in Query level using option , create  Custom Colum which results in to True or False so I can use that filter on that Visual. This may not be solution you are looking for but Thought I will reply with my workaroud.

 Capture.PNG

Then I chose False option so that I see data excluding the ones in the cndition above. 

 

Thanks

Suresh

 

 

amitchandak
Super User
Super User

You can create a visual of text and put a visual level filter .

If you need these text as filter in some other measure then create a new intermediate table using summarize

 

summarize(filter(table,<Your filter 1> && <your Filter 2>), Test column )

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

@amitchandak ,

 

Sorry, I probably used the wrong terminology by saying filter. 

I don't need the text from the "Response Text" column to be a filter, I need to filter the data to return the correct responses, and show them on the table below where the "Health4All" column is. 

 

TableTable

Anonymous
Not applicable

Hello, try this:

 

Health4All Response =
CALCULATE (
VALUES ( 'View Responses'[Response Text] ),
FILTER ( 'View Responses', 'View Responses'[Question] = "text1" ),
FILTER ( 'View Responses', 'View Responses'[Subject] = "text2" )
)

When I enter that formula, I get the error below. 

I saw a workaround on another thread that says to use FIRSTNONBLANK in front of Values, but that's not working for me either. 

 

FormulaFormulaErrorError

Thanks for the help everyone. 

I was able to figure out the solution by playing around with it for a bit. 

photophoto

To return the specific responses to the table, I just needed to use FIRSTNONBLANK. That allows me to apply whatever filters needed, and returns the first response. 

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.