Forum Discussion

dethnass's avatar
dethnass
Icon for Helper I rankHelper I
6 years ago
Solved

divide two value by different tables (date problem)

Hello I would like to know how to divide the values of two columns from two different tables using group by. Major Problem is the tables doesnt have same Date set. In the first table, the rows contai...
  • az38's avatar
    6 years ago

    Hi dethnass 

    try measure in Table1

    Measure = 
    var _tbl1Val = SUM(Table1[Data])
    var _tbl1Date = MAX(Table1[Date])
    var _tbl2Sum = CALCULATE(SUM(Table2[Data]), Table2[Date] = _tbl1Date)
    
    RETURN
    DIVIDE(_tbl1Val, _tbl2Sum)