Forum Discussion

LouisSh's avatar
LouisSh
Frequent Visitor
3 years ago

Sum Specific Columns Of A Matrix

Hi Community,

 

I want to create a matrix which shows how many people were active at a certain address at a given point of time, however SUM certain address as specific regions within the matirx. I have a measure which does the caclulation by address but now need to create the SUM of the certain regions. This is my starting measure which works fine;

Active at a given address =
VAR EndDatePerVisual = MAX(DimDate[Date])
VAR StartDatePerVisual = MIN(DimDate[Date])
VAR Result =
CALCULATE(
    COUNTROWS('DimAddress'),
        REMOVEFILTERS(DimDate),
        'DimAddress'[StartDate] <= EndDatePerVisual,
        'DimAddress'[EndDate] > StartDatePerVisual
        ||
        ISBLANK('DimAddress'[EndDate])
)
RETURN
Result
 
This is how it appears as expected below (removed place names so pardon my editting skills)

I want to be able to add specifix sums of the places based on their region, so a SUM for North, a SUM for South baring in mind this is not doing an ordanriy count as it is could who was between a certain time. Something like the image below with the dark blue columns being what i want to achieve.
 
 
Any thoughts?

1 Reply