Forum Discussion
Sofiane85
2 years agoFrequent Visitor
sales from different dates range
Hi all, i have 2 tables, "Sales" and "Target" in the Target table there is some of products and 2 dates columns : Start Date and End Date, please, i need to calculate the sales from "Sales" table,...
- 2 years ago
Sofiane85
Add following culumn to your target table:Sales = VAR __Prod = Target[Product] VAR __DateStart = Target[start date] VAR __DateEnd = Target[end date] VAR __Result = SUMX( FILTER( Sales, Sales[Product] = __Prod && Sales[Date] >= __DateStart && Sales[Date] <= __DateEnd ), Sales[Qte] ) RETURN __Result
Sofiane85
2 years agoFrequent Visitor
exactely, the seller is in the Sales table, and i want to visualize the sales by Seller and product in the date ranges
and image for exemple
Fowmy
Super User
2 years agoSofiane85
You need to specify the logic to allocate the sales against the sellers. looking at your data, there is not target defined by seller, only by product level.
- Sofiane852 years agoFrequent Visitor
thank you so much my friend, you helped me a lot, i adapted your measure to the sales table, and it works 👍
than you again