Forum Discussion

Yura_greenit's avatar
Yura_greenit
Frequent Visitor
6 years ago
Solved

Many-to-many connection between tables

Hello everyone. I have faced with the following problem:: I have two main tables: Cash Flow table and Land Bank table The Cash Flow table shows the expenses on fields by date. The Land Bank tabl...
  • v-deddai1-msft's avatar
    v-deddai1-msft
    6 years ago

    Hi Yura_greenit,

     

    Would you please try to create a measure for value:

    Value2 =
    
    DIVIDE (
    
        SUM ( 'Land Bank'[Field area] ),
    
        CALCULATE (
    
            SUM ( 'Land Bank'[Field area] ),
    
            FILTER (
    
                ALL ( 'Land Bank' ),
    
                'Land Bank'[Actual Crops] IN DISTINCT ( 'Cash Flow'[Actual Crops] )
    
            )
    
        )
    
    )
    
        * SUM ( 'Cash Flow'[Value] )

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

     

    Best Regards,

    Dedmon Dai