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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
abc_777
Post Prodigy
Post Prodigy

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
v-cgao-msft
Community Support
Community Support

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.