Forum Discussion

renatorezk's avatar
renatorezk
Regular Visitor
4 years ago
Solved

Sumproduct beetwen two fact tables

Hello everybody! I need to perform a SUMPRODUCT beetwen two fact tables related by two dimenson tables. the fields that I need to use are highlighted below. Thay are related by 2 fields in thei...
  • renatorezk's avatar
    4 years ago

    I have found a way to do it. Actually very simple, just a sumx using a lookupvalue inside.

    SUMX(
    'Fact_Qntd_Cotas', 
    'Fact_Qntd_Cotas'[Quantidade_total] *
    LOOKUPVALUE('API Quantum'[Dividendos], 'API Quantum'[Código], 'Fact_Qntd_Cotas'[Ativo], 'API Quantum'[Data], 'Fact_Qntd_Cotas'[DataCorrigida]))
    
    PS: I have changed the name of some tables and columns. But thats the formula that got me the result