Forum Discussion
Total value for all rows
Hello,
I have this matrix visualization with 2 measures:
| AREA | Concepte FACT | Cost | Fact | TempCOST | TempFACT |
| Area1 | 1.437,25 | 2.880,19 | 1.437,25 | 2.880,19 | |
| AM | 25,00 | 1.437,25 | |||
| EC | 20,00 | 1.437,25 | |||
| JS | 1.160,00 | 1.437,25 | |||
| MP | 35,00 | 1.437,25 | |||
| MR | 137,00 | 1.437,25 | |||
| RC | 60,00 | 1.437,25 | |||
| LA01 | 2.778,19 | 2.880,19 | |||
| LA02 | 102,00 | 2.880,19 | |||
| Area2 | 435,00 | 0,00 | 435,00 | 0,00 | |
| AM | 375,00 | 0,00 | 435,00 | 0,00 | |
| JP | 60,00 | 0,00 | 435,00 | 0,00 |
where TempCOST = CALCULATE(SUM(Table1[Cost]);ALL(Table1[Concepte FAC])) and TempFACT = CALCULATE(SUM(Table1[Fact]);ALL(Table1[Concepte FAC])).
I need this result in the table:
| AREA | Concepte FACT | Cost | Fact | TempCOST | TempFACT |
| Area1 | 1.437,25 | 2.880,19 | 1.437,25 | 2.880,19 | |
| AM | 25,00 | 1.437,25 | 2.880,19 | ||
| EC | 20,00 | 1.437,25 | 2.880,19 | ||
| JS | 1.160,00 | 1.437,25 | 2.880,19 | ||
| MP | 35,00 | 1.437,25 | 2.880,19 | ||
| MR | 137,00 | 1.437,25 | 2.880,19 | ||
| RC | 60,00 | 1.437,25 | 2.880,19 | ||
| LA01 | 2.778,19 | 1.437,25 | 2.880,19 | ||
| LA02 | 102,00 | 1.437,25 | 2.880,19 | ||
| Area2 | 435,00 | 0,00 | 435,00 | 0,00 | |
| AM | 375,00 | 0,00 | 435,00 | 0,00 | |
| JP | 60,00 | 0,00 | 435,00 | 0,00 |
Which are the correct formula to the both measures?
Thank you.
19 Replies
- FloriankxSolution Sage
Hello,
can you show us the structure of your raw data?
Your Measures should work perfectly.
I created this RawTable:
Area Concepte FACT Cost Fact Area1 AM 25,00 Area1 EC 20,00 Area1 JS 1.160,00 Area1 MP 35,00 Area1 MR 137,00 Area1 RC 60,00 Area1 LA01 2.778,19 Area1 LA02 102,00 Area2 AM 375 0 Area2 JP 60 0 I created the following Measures:
Cost_:=SUM(Table1[Cost])
TemCOST:=CALCULATE([Cost_];ALL(Table1[Concepte FACT]))
Fact_:=SUM(Table1[Fact])
TempFACT:=CALCULATE([Fact_];ALL(Table1[Concepte FACT]))
And this is my result:
- FloriankxSolution Sage
Hello,
relationship doesn't seem to be the problem, as long as CodArea columns are related properly and CodArea is unique in your AREAS Table.
It still should work.
You can try to use CodArea of Table1 instead of Area of the AREAS Table and see if something changes.
Best regards.