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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
jayjay0306
Helper III
Helper III

filter from many to one relation between two tables

Hi guys,

I hope you can help me with a problem:

 

I have a DIM_Product table and a FACT_Volume table.

The relation between the "product"-table and "Volume"-table is '1-to-many'.

 

Volume table.PNG

In my Product table I have a lot of redundant products, which have no volume (in the example above there is one ("3")). 

My problem is that I can't make the cross-filter direction="both", which would solve the problem.

Now, my question is:

Is there a way to set up a calculated column (fx. "flag") on the product table, which can be used as filter, based on the volumes in the volume-table?

I have tried the following as a calculated column on the product table:

 

Active products = IF(NOT(ISEMPTY('Volume table')),1,0)

     ... but that didn't work.

Any ideas?

 

thanks.

Br,

Jayjay0306

1 ACCEPTED SOLUTION
Shaurya
Memorable Member
Memorable Member

Hi @jayjay0306,

 

You can use:

 

Flag = IF(CALCULATE(SUM(Volume[Volume]),FILTER(Volume,'Product'[ID]=Volume[ID]))>0,1,0)

 

Works for you? Mark this post as a solution if it does!
Consider taking a look at my blog: Forecast Period - Previous Forecasts

View solution in original post

3 REPLIES 3
Shaurya
Memorable Member
Memorable Member

Hi @jayjay0306,

 

You can use:

 

Flag = IF(CALCULATE(SUM(Volume[Volume]),FILTER(Volume,'Product'[ID]=Volume[ID]))>0,1,0)

 

Works for you? Mark this post as a solution if it does!
Consider taking a look at my blog: Forecast Period - Previous Forecasts

Thanks Shauya, this works perfectly. 🙂

 

Br,

Jayjay0306

johnt75
Super User
Super User

Try changing it to

Active products = IF(NOT(ISEMPTY(RELATEDTABLE('Volume table'))),1,0)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

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

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.