Forum Discussion
Trave97
3 years agoNew Member
Problem with metric calculation
Hello everyone, my level on DAX language is beginner and I’m facing a project where other stakeholders know less about it than I do. I have this kind of table From the Fact table, I have to c...
Trave97
3 years agoNew Member
Hi Greg_Deckler
forgive me if I specified it wrong, the problem is that from this type of data (I attach sample file and screen).
I would like to create a metric that calculates for each product the total QTY for the type of data FP-Sales, not taking all records with this condition but only those that fall within the range (week where the first intake value is presented and the next 8 weeks) in this example then I would like to have a metric that for the article A1CC2PA140C102 I have a value equal to (3+2+1=6) because the week corresponding to these values meet the condition, that is ( the week in which the first value = 17 and the next 8=25 [INTAKE DATA TYPE])
| Week | Data type | QTY | Product |
| 17 | Intake | 1 | A1CC2PA140C102 |
| 16 | FP-Sales | 1 | A1CC2PA140C102 |
| 15 | FP-Sales | 7 | A1CC2PA140C102 |
| 22 | FP-Sales | 3 | A1CC2PA140C102 |
| 27 | FP-Sales | 2 | A1CC2PA140C102 |
| 27 | FP-Sales | 1 | A1CC2PA140C102 |
| 29 | FP-Sales | 6 | A1CC2PA140C102 |
| 29 | FP-Sales | 5 | A1CC2PA140C102 |
Let me know if I was clear that way,
thanks