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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
ditoparker
New Member

Using a parameter to filter my visual

Hello! for context, I am veteran Tableau user on his first week using Power BI so apologies in advance if I am approaching this the wrong way.


I have one column with the values:
Joe
Joe
Everyone
Everyone
Everyone


I want to create a parameter with the options: Joe and Everyone.


Then I want to connect this to a filter so if I select "Joe" it will show all values (Joe + Everyone, as Joe also has to do what everyone else does). If I select "Everyone", it only shows the rows with "Everyone"


Any pointers would be much appreciated, thanks!

1 ACCEPTED SOLUTION
ullassl1991
Helper I
Helper I

Hi @ditoparker , I have taken some sample of data based on your explination like this table Sheet1

ullassl1991_2-1745921669465.png

 

I just worked on this data I have a solution on your requirement
Step1: Create a unrelated table "Selection" with this strings

ullassl1991_1-1745921592091.png

Step2: Create the follwing measure to assign values to those selections

Measure = SWITCH(
    SELECTEDVALUE(Selection[Name]),
    "Joe",SUM(Sheet1[work]),
    "Everyone",CALCULATE(SUM(Sheet1[work]),Sheet1[name]="Everyone"))

Step 3 
This is the actual value of work as per the table

ullassl1991_3-1745921845031.png

its showing Everyone=81, Joe=11, Total=92
Now take the "Name" column from Seletion table and take the measure created into card

ullassl1991_4-1745922005953.png

 

ullassl1991_5-1745922026122.png

we can see overall value is shown under Joe and remaining value shown under everyone
I hope it gives the solution you want , let me know
Thank you



View solution in original post

6 REPLIES 6
Ray_Minds
Continued Contributor
Continued Contributor

Hi @ditoparker

Please follow these steps -

Step1:  Create the using Dax below.

Selection Parameter =

DATATABLE(

   "Selection Parameter", STRING,

   "SortOrder", INTEGER,

   {

       {"Joe", 1},

       {"Everyone", 2}

   }

)


Use this Parameter in slicer.
 

Seep2: create Filter Measure using below Dax:

Filter Logic =

VAR SelectedValue = SELECTEDVALUE('Selection Parameter'[Selection Parameter], "Everyone")

RETURN

IF(

   SelectedValue = "Joe",

   1, 

   IF(

       SELECTEDVALUE(P_Data[Name]) = "Everyone",

       1,

       0 

   ))

Step3: Add the measure to your visual's filters:

Select your visual >  Go to Filters pane > Drag "Filter Logic" measure to filters >

Set filter to show when value = 1

Result: Select "Joe" in slicer
 

Ray_Minds_0-1746688765063.jpeg

 


 Select "Everyone" in slicer
 

Ray_Minds_1-1746688765064.jpeg

 

Best regards,
Ray Minds
http://www.rayminds.com
https://www.linkedin.com/company/rayminds/


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

v-menakakota
Community Support
Community Support

Hi @ditoparker ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

Hi @ditoparker ,


I wanted to check if you had the opportunity to review the information provided by @ullassl1991 . Thank you ullassl1991 for providing possible solution. Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

Thank you.

Hi @ditoparker ,

I wanted to check if you had the opportunity to review the information provided by @ullassl1991 . Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution so other members can easily find it.

Thank you.

ullassl1991
Helper I
Helper I

Hi @ditoparker , I have taken some sample of data based on your explination like this table Sheet1

ullassl1991_2-1745921669465.png

 

I just worked on this data I have a solution on your requirement
Step1: Create a unrelated table "Selection" with this strings

ullassl1991_1-1745921592091.png

Step2: Create the follwing measure to assign values to those selections

Measure = SWITCH(
    SELECTEDVALUE(Selection[Name]),
    "Joe",SUM(Sheet1[work]),
    "Everyone",CALCULATE(SUM(Sheet1[work]),Sheet1[name]="Everyone"))

Step 3 
This is the actual value of work as per the table

ullassl1991_3-1745921845031.png

its showing Everyone=81, Joe=11, Total=92
Now take the "Name" column from Seletion table and take the measure created into card

ullassl1991_4-1745922005953.png

 

ullassl1991_5-1745922026122.png

we can see overall value is shown under Joe and remaining value shown under everyone
I hope it gives the solution you want , let me know
Thank you



d_m_LNK
Resolver II
Resolver II

A simple thing to start with would be a slicer visual and adding the referenced column to that visual.  This will filter the entire page by what you select in the slicer.  That will allow you to select either value from that column and filter the page in that way.  I am less clear about the "Joe" option as that seems to be more related to the rest of the table data or the data model for filtering behavior.  There is a select all option in the slicer visual as well you can toggle on.  

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors