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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Createing a slicer for missing values in a certain table

Hi, 


I'm trying to create a filter so I can filter products that are/aren't classified as "Killers" in my company marketing strategy. My data model is structured this way:

 

gabrielrtomaz_1-1623099257308.png

 

The 'Killers' table is connected via DirectQuery to the 'Produto' table (product info lookup table) by the product's SKU identifier in a one-to-many relationship. The problem is that not every product is considered a "killer" and when I put the Killers['Killer'] column (a "yes" classifier for every single product in the 'Killers' table) as a slicer into my report I can only choose to filter the page as only the products of the said table (just the ones considered "killers") or all the products in general, I can only see a "yes" filter option, that is I can't look at the performance of the products that are "not killers" separately...


Is that a way to create a measure or calculated column inside PBI through DAX so I can use it as a slicer in my dashboards, separating the data into "killers" and "not killers"?

 

Thanks!

1 ACCEPTED SOLUTION

Hi @Anonymous ,

You can use Lookupvalue() function to create the corresponding killer columnn based on the two related columns:

Killer = LOOKUPVALUE(Killers[Killer],Killers[SKU],'PRODUTO'[CODIGO PRODUTO])

t1.pngt2.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous , You can have a calculated column in the direct query, a simple one. Try this

a new column

if([Killer] = "Yes", "Killer", "Non Killer")

 

see if you can use that

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks for the reply, @amitchandak

Unfortunately, this is not possible... Creating this new column in the 'Killers' table leaves me with the same problem and I can't create the column in the 'PRODUTO' table, the reference to 'Killers'[Killer] does not appear when writing the formula and apparently I can't use RELATED() because of the 1-* relationship...

Hi @Anonymous ,

You can use Lookupvalue() function to create the corresponding killer columnn based on the two related columns:

Killer = LOOKUPVALUE(Killers[Killer],Killers[SKU],'PRODUTO'[CODIGO PRODUTO])

t1.pngt2.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi, @v-yingjl. Thanks for the response! 

The problem that I am facing is that not every product that is in 'PRODUTO[CODIGO PRODUTO]' is in the 'Killer[SKU]', "Killers" is a subgroup of the total product list...

'PRODUTO' is my product lookup entry so in theory there are no duplicate SKUs in it, and 'Killers' is also, though much smaller, a lookup table, a subset of all my SKUs that are considered "killers". 

Based on your example is like the 'Killers[SKU]' didn't have any value for the product B or E, these products are not killers because they don't appear in the 'Killers' table, only in the 'PRODUTO' table.

Hi @Anonymous ,

LOOKUPVALUE() is used to find the corresponding values in tables. If B and E are not in 'Killers' table, the result would not be changed.

T1.pngT2.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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