How to do it...

To implement this recipe, do the following:

  1. Create the following measure:
AcrossThenDown = 
VAR __Table = ALL('R06_Table')
VAR __ColA = MAX('R06_Table'[Col A])
VAR __ColB = MAX('R06_Table'[Col B])
VAR __Count = COUNTX(FILTER(__Table,[Col A] < __ColA),[Col A]) + 1
VAR __PreviousRows =
SUMX(
FILTER(__Table,[Col A]<__ColA),
[Value]
)
VAR __CurrentRow =
SUMX(
FILTER(__Table,[Col A]=__ColA && [Col B]<=__ColB),
[Value]
)
RETURN
IF(ISINSCOPE('R06_Table'[Col A]),
IF(__Count = 1,
__CurrentRow,
__PreviousRows + __CurrentRow
),
IF(ISINSCOPE('R06_Table'[Col B]),
SUMX(
FILTER(__Table,[Col B] <= __ColB),
[Value]
),
SUMX(__Table,[Value])
)
)
  1. On a Report page, create a Matrix visualization.
  2. In the Matrix visualization, place the Col A column from the R06_Table table into the Rows area of the visualization.
  3. In the same Matrix visualization, place the Col B column from the R06_Table table into the Columns area of the visualization.
  4. In the same Matrix visualization, place the AcrossThenDown measure into the Values area of the visualization.