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
Evogelpohl
Helper V
Helper V

Measure to Display Column Names Used as Filters

I have a simple model with 3 tables, Sales, Product, Calendar.  

 

Sales has Cols: ProductID, Amount, TransDate & Measure = [Total Sales]

Product has Cols: ProductID, Name

Calendar has Cols: Date, Year/Mo, Year/Qtr, MonthName (etc...)

 

I want to build a measure that returns the column names selected in a table visual as chosen by the user.

 

For example, if a user of this dataset builds a 3 column table by dragging out: 

Calendar[Year/Mo] | Product[Name] | [Total Sales] 

 

I'd like a measure called [You've Chosen:].  That measure, if dragged out as the 4th column in the table, would return the following text for each row in the resulting table.

"Calendar[Year/Mo], Product[Name]"

 

In other words, I'd like a dynamic measure of all the Table.ColName used to filter the table in which the measure is deployed.  I understand I could write a long measure with all the column names w/ IF (ISFILTERED(col), then (col), but I'd like to do it dynamically.

 

Thanks in advance. 

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

I don't think there is a way @Evogelpohl , even using ISFILTERED.  Unless the user selects a row in the table or there are slicers on the columns then the fields are not filtered.

No row selectedNo row selectedWith row selectedWith row selected

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

I don't think there is a way @Evogelpohl , even using ISFILTERED.  Unless the user selects a row in the table or there are slicers on the columns then the fields are not filtered.

No row selectedNo row selectedWith row selectedWith row selected

Right, I meant to say if a specific value was chosen, then it would switch the ISFILTERED, HASONEVALUE functs to evaluate to true.  Thanks, @jdbuchanan71 .

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.