Forum Discussion

game1's avatar
game1
Icon for Helper III rankHelper III
2 years ago
Solved

Perform a calculation between 2 tables

Hello, 

Suppose I have these two tables. I would like to calculate a measure to divide table 1 and table2:

 

 

 

 

  • hi game1 

     

    I have joined these two tables on Date column, with one to many relationship and single.

     

     

     

    Create this measure.

     

    Measure =
    VAR _Date = SELECTEDVALUE(Table1[Date])
    VAR _Price = CALCULATE( SUM(Table1[Price]) )
    VAR _Item = CALCULATE( SUM('Table'[Items]) )

    RETURN DIVIDE( _Price, _Item)
     

     

1 Reply

  • talespin's avatar
    talespin
    Icon for Solution Sage rankSolution Sage

    hi game1 

     

    I have joined these two tables on Date column, with one to many relationship and single.

     

     

     

    Create this measure.

     

    Measure =
    VAR _Date = SELECTEDVALUE(Table1[Date])
    VAR _Price = CALCULATE( SUM(Table1[Price]) )
    VAR _Item = CALCULATE( SUM('Table'[Items]) )

    RETURN DIVIDE( _Price, _Item)