The following measure shows the average per Werks and MATNR but static, for all values in the table.
CALCULATE(
AVERAGEX(
SUMMARIZE( LieferscheineUnique, LieferscheineUnique[WERKS], LieferscheineUnique[MATNR] ),
CALCULATE( AVERAGE(LieferscheineUnique[fci_zu_PA] ) )
),
ALLEXCEPT( LieferscheineUnique, LieferscheineUnique[WERKS], LieferscheineUnique[MATNR] )
)
I have the following table
| DATUM | WERKS | ID | MATNR | fci_zu_PA | Average_fci_per_Werks&MATNR |
|---|---|---|---|---|---|
| 08.04.2021 | H006 | 1 | 10009 | 41,7 | 35,84 |
| 12.04.2021 | H006 | 2 | 10009 | 43,3 | 35,84 |
| 14.04.2021 | H006 | 3 | 10009 | 43,5 | 35,84 |
| 08.04.2021 | H100 | 4 | 10009 | 43,3 | 38,20 |
| 22.04.2021 | H100 | 5 | 10009 | 43,3 | 38,20 |
| 22.04.2021 | H100 | 6 | 10010 | 24,5 | 35,01 |
Now I want the average per WERKS and MATNR displayed in each row according to the date filter.
The desired output would look like this:
| DATUM | WERKS | ID | MATNR | fci_zu_PA | Average_fci_per_Werks&MATNR |
|---|---|---|---|---|---|
| 08.04.2021 | H006 | 1 | 10009 | 41,7 | 42,83 |
| 12.04.2021 | H006 | 2 | 10009 | 43,3 | 42,83 |
| 14.04.2021 | H006 | 3 | 10009 | 43,5 | 42,83 |
| 08.04.2021 | H100 | 4 | 10009 | 43,7 | 43,50 |
| 22.04.2021 | H100 | 5 | 10009 | 43,3 | 43,50 |
| 22.04.2021 | H100 | 6 | 10010 | 24,5 | 24,50 |
It would be great if someone knows how to achieve this.