Forum Discussion

davidi4524's avatar
davidi4524
Helper III
9 years ago
Solved

how to create sum by dates column

hi ' i have two tables: 1. sales per date columns: branch,date,sale 2.target per date columns: branch,date,target   i need to calculate the the target - total sales per date my problem is that t...
  • v-caliao-msft's avatar
    9 years ago

    davidi4524,

     

    You can use the DAX expression below to get your result.
    Sales table:
    Column = LOOKUPVALUE(Target[Target],Target[Date],Sales[Date])

    Target table

    Column = CALCULATE(SUM(Sales[Sales]),FILTER(ALL(Sales),Sales[Date]=Target[Date]))

     

    Regards,

    Charlie Liao