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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.