Forum Discussion
% GT over two columns
- 9 years ago
Hi,
Create a measure:
% of GT = sumx(Table1;Table1[Count A]+Table1[Count B])/calculate(SUM(Table1[Count A])+SUM(Table1[Count B]);all(Table1))
Replace table1 with the name of your table.
The sumx function takes the sum of count A and count B at row level.
The second part takes the sum of count A+count B for the whole table (it does this because we use a the "ALL" function which ignores the current context of the row. For you to understand the solution, search some info about the DAX functions: All, Calculate, SUM and SUMX.
Hi,
Create a measure:
% of GT = sumx(Table1;Table1[Count A]+Table1[Count B])/calculate(SUM(Table1[Count A])+SUM(Table1[Count B]);all(Table1))
Replace table1 with the name of your table.
The sumx function takes the sum of count A and count B at row level.
The second part takes the sum of count A+count B for the whole table (it does this because we use a the "ALL" function which ignores the current context of the row. For you to understand the solution, search some info about the DAX functions: All, Calculate, SUM and SUMX.