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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
WinterGarden
Helper II
Helper II

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
Memorable Member
Memorable Member

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

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