Forum Discussion

mespoKTM's avatar
mespoKTM
Regular Visitor
5 years ago
Solved

Calculated column sum from other table based on other column value

Hi, I'll try to explain what I need.   I have a table which contains some target value. I would calculate a value based on other table depending on "Cd_CACda" column.   So, this is the calculated...
  • V-lianl-msft's avatar
    5 years ago

    Please try:

     

    Allocazione_1 = 
    VAR ONF = CALCULATE(SUM(QUERY_CostiIndiretti[Importo]),
    FILTER(ALL(QUERY_CostiIndiretti),
    QUERY_CostiIndiretti[CentroAnalisi] = "OF001"))
    
    RETURN
    IF(Allocazione_Ordine[Cd_CACda] = "AMM001",ONF,0)

     

    If the problem persists,could you share the sample pbix with dummy data?

    Please remove any sensitive data before uploading.