Forum Discussion
davidi4524
9 years agoHelper III
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...
- 9 years ago
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
davidi4524
9 years agoHelper III
but for the target i dont need to do sum , i just need to show it.
and how can i do target-sales?
Anonymous
9 years agoNot applicable
Even if you have a single entry of a single value, you still need to use a formula that will handle aggregate data. Power BI, ahead of time, doesn't know you will only ever have 1 value. By telling it to sum, or average or whatever, you are instructing it on how to handle 1 or more rows of data.