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

row wise filter

My matrix table looks like below in visualization:

 targetstock
Jan-1812
Feb-1822
Mar-1832
Apr-1842
May-1852

 

stck is from a different table and having inactive relation with target.

I want to achieve like below:

 targetstock
Jan-1812
Feb-182 
Mar-183 
Apr-184 
May-185 

 

Kindly help.

 

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @sam_nik12345 ,

 

You can use UESRELATIONSHIP() function to active the relationship.

Measured =
CALCULATE(
    SUM( 'Table 2'[stock] ),
    USERELATIONSHIP ( 'Table 2'[target], 'Table 1'[target] )
)

Result:

vchenwuzmsft_0-1642055012174.png

 

Please share your pbix file without sensitive data if you need more help.

 

Best Regards

Community Support Team _ chenwu zhu

 

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

2 REPLIES 2
v-chenwuz-msft
Community Support
Community Support

Hi @sam_nik12345 ,

 

You can use UESRELATIONSHIP() function to active the relationship.

Measured =
CALCULATE(
    SUM( 'Table 2'[stock] ),
    USERELATIONSHIP ( 'Table 2'[target], 'Table 1'[target] )
)

Result:

vchenwuzmsft_0-1642055012174.png

 

Please share your pbix file without sensitive data if you need more help.

 

Best Regards

Community Support Team _ chenwu zhu

 

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

 

amitchandak
Super User
Super User

@sam_nik12345 , need to understand the stock measure. based on that we need top it on min month

 

One way is

measure =

var _min = minx(allselected('Date'), Date[Date])

return

calculate(sum(Table[Stock]), filter('Date', Date[Date] =_min ))

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

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.