1.Tính tổng theo năm 2018
Sales = sumx(filter(Purchase,YEAR(Purchase[PurchaseDate])=2018),Purchase[Price]*Purchase[Quantity])
2.Tính tổng theo năm 2018 VÀ những đơn hàng có số lượng >=5
Sales = sumx(filter(Purchase,and(YEAR(Purchase[PurchaseDate])=2018,Purchase[Quantity]>=5)),Purchase[Price]*Purchase[Quantity])
3. Tổng theo tháng
Sales2 = sumx(filter(Purchase,MONTH(Purchase[PurchaseDate])=12),Purchase[Price]*Purchase[Quantity])
Nhận xét
Đăng nhận xét