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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
WinterGarden
Helper IV
Helper IV

DAX measure for getting values in a column based on filter condition

Hi,
I've one filter/slicer, the values in that slicer is based on the below measure.


Activity_Filter =

SELECTCOLUMNS(FILTER('Engagement Activity Code','Engagement Activity Code'[Engagement/Projects] = [SelectedProject]),

"Activity Name",'Engagement Activity Code'[Activity Name])


My requirement is that i need to show only the Activity Names in the silicer which are filtered based on the filter condition

can i add a measure into a slicer visual, if not how to get multiple values in a column by applying filter condition into that table and display those values from that column in the slicer.

1 ACCEPTED SOLUTION

Hi @WinterGarden 

You can't put the measure directly into the slicer no.

Instead put your original column into the slicer: Engagement Activity Code'[Activity Name]
Then in the FILTER PANE put your measure: [Activity_Filter] filter this to IS NOT BLANK

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

View solution in original post

7 REPLIES 7
SamWiseOwl
Super User
Super User

Hi @WinterGarden 

You want to put the Engagement Activity Code Actvity Name column in a slicer.

Then add a filter to that slicer using your above measure Is NOT blank:

SamWiseOwl_0-1722869665218.png

Hope this helps, if it does please mark as a solution for others to find 🙂


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Hi @SamWiseOwl,

it seems like i cant add that measure to the slicer feild.

Hi @WinterGarden 

You can't put the measure directly into the slicer no.

Instead put your original column into the slicer: Engagement Activity Code'[Activity Name]
Then in the FILTER PANE put your measure: [Activity_Filter] filter this to IS NOT BLANK

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

My requirement is that i need to show only the Activity Names in the silicer which are filtered based on the filter condition
'Engagement Activity Code'[Engagement/Projects] = [SelectedProject]
if i directly use that 'Engagement Activity Code'[Activity Name] column , how can i filter the values in it bsed on the above condition?

I have made a mock up here: Measure as Slicer filter.pbix

Please have a look and let me know what is different and/or provide some data that will help me understand your issue.

Cheers!


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

It worked!! 
Thank you so much 🙂

It's a fun trick, thanks for asking!


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors