Forum Discussion
Get Daily sum
I have a table with date and sales but when I applied summation to get daily sum it gives wrong results. I used:
Daily Sales = SUM(sales[Sales])
My original table (sales):
After using the formula, I get summation as below (which is wrong):
Please help!
- Anonymous4 years ago
Hi Anonymous ,
You could create a measure like below.
measure = calculate(sum(sales[sales]),filter(allselected('sales'),'sales'[date]=selectedvalue('date'[date])))
Best Regards,
Jay
9 Replies
- AnonymousNot applicable
- Samarth_18Community Champion
Hi Anonymous ,
Are you using date and sales from same table or different?
Thanks,
Samarth
- AnonymousNot applicable
HI! From different tables. Date from calander table and sales from sales table. I joined them based on the date.
- AnonymousNot applicable
I summarized using 'sum' in the table view insdead of calculated measure, and still getting the same results, which is wrong. Thanks!
- PaulDBrownCommunity Champion
Can you provide sample data?
- AnonymousNot applicable
I am not sure how but, re-doing the model gave the correct solution. Thanks all
- AnonymousNot applicable
Hi Anonymous ,
You could create a measure like below.
measure = calculate(sum(sales[sales]),filter(allselected('sales'),'sales'[date]=selectedvalue('date'[date])))
Best Regards,
Jay