Forum Discussion
depple
Helper III
7 years agoSingle value from group - Correct sum in visual matrix
Hi,
I have a data table like this:
| Data | ||
| Product Group | Product | Value |
| Star | Star Alfa | 7 |
| Star | Star Bravo | 7 |
| Star | Star Charlie | 7 |
| Sun | Sun Mike | 12 |
| Sun | Sun November | 12 |
| Sun | Sun Oscar | 12 |
| Sun | Sun Papa | 12 |
I use this measure:
| Measure = CALCULATE(AVERAGE('Data'[Value]);FILTER('Data';'Data'[Sales]=0)) |
In this matrix:
| Salesman | Star | Sun |
| Salesman A | 7 | 12 |
| Store 1 | 7 | 12 |
| Store 2 | 7 | 12 |
My problem is that though the values for each store is like I want it, I want the vertical sum for Salesman to be 14 and 24. I know that the reason for this is the use of the AVERAGE-function in the measure, but how should I build the measure to get the correct Sum for Salesman, like this:
| Salesman | Star | SunMeasure |
| Salesman A | 14 | 24 |
| Store 1 | 7 | 12 |
| Store 2 | 7 | 12 |
Thanks in advance for any suggestions!
/depple
Hi depple ,
Add below measure into Matrix.
Average = SUMX(VALUES(Data_1[Store]),[Measure])
Best regards,
Yuliana Gu
1 Reply
- v-yulgu-msft
Microsoft Employee
Hi depple ,
Add below measure into Matrix.
Average = SUMX(VALUES(Data_1[Store]),[Measure])
Best regards,
Yuliana Gu