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

Helper III

## Measure: filter "product name" where sales>0

Hi folks,

I hope you can help me here:

I have a report where I need to add a "product name"-slicer, but I only want to see the product names of products, where sales>0

Example:

if I combine the product- and sales table, I get this:

hence, what I want to see in my filter is this:

My problem is that the relation between the "Product"-table and the "Sales"-table is single "1:many"-relation:

model(part of):

so I can't just add a filter on the "slicer"-visual with the crieteria: "Sales" is greater than 0.

Therefore,

Question:

Is it possible to make a calculated column on the product table which "flags" the products where sales>0?

if "yes", how?

I have tried to make the following calculated column on the product table:

``Flag= IF(SUM(Sales)>0,1,0)``

but the I only gets "1".

thanks,

Br,

jayjay0306

1 ACCEPTED SOLUTION
Memorable Member

So the relationship between D_Product and Sales is 1:n and is active? => Good

The measure in Sales is "Sales = SUM(Sales[Sales])? => Good

Then it should work when you place the Product from "D_Product" in the Slicer and set the filter as described.

But it doesn't work apparently so please show some screenshots (relationship, slicer with filter and the measure) - i'm sure we can solve this 😉

4 REPLIES 4
Memorable Member

just add sales to the slicer filters and filter to "is not blank"

Helper III

Hi lukiz84,

Thanks but I am afraid, I have already tried that and for some reason it doesn't work. I has no effect? 😞

Memorable Member

So the relationship between D_Product and Sales is 1:n and is active? => Good

The measure in Sales is "Sales = SUM(Sales[Sales])? => Good

Then it should work when you place the Product from "D_Product" in the Slicer and set the filter as described.

But it doesn't work apparently so please show some screenshots (relationship, slicer with filter and the measure) - i'm sure we can solve this 😉

Helper III

Thanks lukiz84, You just gave me a great help there 🙂

You write "the measure in Sales...."! the "measure" I have tried to use is merely the "Value"-column "sales" in the table. If I make it as an actual measure (i.e. SUM(Sales[Sales]), it works!

well, well, I learn every day 😉

thanks for the input.

Br,

Jayjay0306

## Helpful resources

Announcements

#### Join our Community Sticker Challenge

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Top Solution Authors
Top Kudoed Authors