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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
abc_777
Solution Specialist
Solution Specialist

Hi

Hi,

 

I have following relation with

invtrackingsummary table and product_file

and 

profuct_stock and product_file

 

abc_777_0-1666584976717.png

 

I want to take scanQTY column from invtrackingsummary table to product_stock table but its shows me wrong value 

 

my measure is 

 

1. inv_scanqty to Product_stock =
VAR _b =
    CALCULATE (
        MAX ('bm_retail_t invtrackingsummary'[ScanQty]),
        CROSSFILTER ('bm_retail_t product_stock'[BARCODE], 'bm_retail_t product_file'[BARCODE], Both )
    )
RETURN
    CALCULATE (
        _b,
        CROSSFILTER ( 'bm_retail_t invtrackingsummary'[Barcode], 'bm_retail_t product_file'[BARCODE], Both )
    )

 

please help me out

 

thanks

1 REPLY 1
Anonymous
Not applicable

Hi @abc_777 ,

 

More data is needed. Could you consider providing sanitized sample data and publishing the expected output?

 

And check the following:

In CROSSFILTER, the cross-filtering setting of a relationship is not important; that is, whether the relationship is set to filter one, or both directions in the model does not affect the usage of the function. CROSSFILTER will override any existing cross-filtering setting.

An error is returned if any of the columns named as an argument is not part of a relationship or the arguments belong to different relationships.
If CALCULATE expressions are nested, and more than one CALCULATE expression contains a CROSSFILTER function, then the innermost CROSSFILTER is the one that prevails in case of a conflict or ambiguity.

The arguments OneWay_RightFiltersLeft and OneWay_LeftFiltersRight can be used in many-to-many and one-to-many relationship types, but not in the one-to-one relationship type.
When the cross-filter type OneWay_RightFiltersLeft or OneWay_LeftFiltersRight is used in a one-to-many relationship type, it must be consistent with the only allowed filter propagation, which is one-to-many. If the requested direction is the opposite one, CROSSFILTER returns an error.

CROSSFILTER only changes the cross filter direction applied when the relationship is active. CROSSFILTER does not change the active state of the relationship: USERELATIONSHIP must be used to activate an inactive relationship,.

CROSSFILTER

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.