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
Julian_H
Helper II
Helper II

Slicers and Filtering

Hi

 

I have had a request from a work collegue to be able to filter by the value selected  in  the slicer and a defualt value.

 

e.g. slicer has  A B C D E in it

The selection is C which will filter the data to show C data

However I need to show C data plus Z data (a default value)

 

Values C and Z live in the same columnin the table

 

The slicer cant show Z as an option 

 

Please cna nay one help ?

 

Thank you

10 REPLIES 10
bhelou
Responsive Resident
Responsive Resident

bhelou_0-1709458014111.png

Try puting it directly in the filter 

Hi That wouldnt work as it needs to be based on the slicer selection plus Z

No worries, will keep digging 🙂

bhelou
Responsive Resident
Responsive Resident

Hello , if you can share some sample it would be better to know what is the issue 

Unfortunatley this quite sensitive data so cant actually supply a proper example , so here a mock up

Julian_H_0-1709224691583.png

 

bhelou
Responsive Resident
Responsive Resident

Hi , you can put it in a card or a table , 

for filter just drag and drop anything you want to make filter for it and set the conditions . 

hope this worked with you , if not share some sample of the PBIX file to go through it 

Hi 

I get the following when set up as a measure

 

Julian_H_0-1709043694166.png

 

Have you tried putting in brackets like (Accounts[Earnout_BoBNAme] = SelectedValue) ||  (Accounts[Earnout_BoBNAme] = "Z")  ?

Sometimes when combining expressions with || the parts associate with a priority that does not match what might be expected. 

Sorry but that doesnt work either

 

bhelou
Responsive Resident
Responsive Resident

Try this : 
Filtered_Data =
VAR SelectedValue =
SELECTEDVALUE('Your_Table_Name'[Column_Name]
)
RETURN
FILTER( 'Your_Table_Name', 'Your_Table_Name'[Column_Name]
=
SelectedValue
||
'Your_Table_Name'[Column_Name] = "Z"
)


Thank you for replying.

 

Would you set this as a measure then add it in to the "Filters on this visual" section 

Julian_H_0-1709040564635.png

 

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.