Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello,
I wanted to retrieve the total sold quantity of the first 12 month of each product. This command worked well at product level :
CALCULATE([Total Quantities],DATESINPERIOD('Sales'[Date],MIN('Sales'[Date]),12,MONTH))
But in my matric, when I want to retrieve the subtotal at category level, this formula doesn't calculate the sum of the 12 first months of sales of each product but the sum of the sales of all products starting from the first transaction in this category + 12 months.
So I thought this could be solved by iterating the table product :
Hi Raph :
Try like below codes :
The Date in DATESINERIOD function is Date[Date] not Sales[Date]
@Raph , Try like
SUMX(values('PRODUCTS'[Product]),CALCULATE([Total Quantities],DATESINPERIOD('Sales'[Date],MIN('Sales'[Date]),12,MONTH)))
or
SUMX(Summarize('PRODUCTS'[Product],"_1",CALCULATE([Total Quantities],DATESINPERIOD('Sales'[Date],MIN('Sales'[Date]),12,MONTH))),[_1])
Thank you very much for your answer @amitchandak but the 2 commands return exatcly the same result I had before... strange.
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |