Hi Sam,
I seem to have come a full circle, right back to the start of this topic.
Right in the beginning, I had the problem where the measure did not calculate the sum at the bottom of the matrix.
Now that I have refactored the Next Year Base measure I am back to this problem. It is demonstrated on the testing tab.
I think this is having flow on effects to my branching measures.
Next year base is defined as
Next Year Base =
IF(
ISBLANK( [Previous Year Level] ),
BLANK(),
[PY Count] + [Repeating Students] + [LOA Returning (Next Year)]
)
The normal way to make it calculate the total at the bottom is
Next Year Base Testing =
VAR NYB =
IF(
ISBLANK( [Previous Year Level] ),
BLANK(),
[PY Count] + [Repeating Students] + [LOA Returning (Next Year)]
)
VAR NYBTotal = SUMMARIZE('Student Monthly Statistics', 'Student Monthly Statistics'[Year Level], "Total Base", NYB)
RETURN
IF(
HASONEVALUE('Student Monthly Statistics'[Year Level]) || HASONEVALUE(Gender[Gender]),
NYB,
SUMX(NYBTotal,[Total Base])
)
This is not working. No total
I suspect that measure that branch from that also have no total.
It is something to do with the way the blanks are handled.
Confirmed Intake Testing =
VAR NextYearValue = CALCULATE( MAX(Dates[Year]), ALLSELECTED(Dates) ) + 1
RETURN
CALCULATE(
[Count Future Status],
FILTER(
'Future Student Status',
RELATED('Future Status Lookup'[Synergy Meaning]) = "FINALISED" &&
'Future Student Status'[Future Enrol Year] = NextYearValue
)
)
works, but there is an item in the row where there is a blank next year, so I added an IF
Confirmed Intake =
VAR NextYearValue = CALCULATE( MAX(Dates[Year]), ALLSELECTED(Dates) ) + 1
VAR Intake =
IF(
[Next Year Base] = BLANK(),
BLANK(),
CALCULATE(
[Count Future Status],
FILTER(
'Future Student Status',
RELATED('Future Status Lookup'[Synergy Meaning]) = "FINALISED" &&
'Future Student Status'[Future Enrol Year] = NextYearValue
)
)
)
VAR Total = SUMMARIZE('Future Student Status', 'Future Student Status'[Future Enrol Year], "Enrol Total", Intake)
RETURN
IF(
HASONEVALUE('Year Levels Lookup'[Year Level]) || HASONEVALUE(Gender[Gender]),
Intake,
SUMX(Total, [Enrol Total])
)
The calculation breaks.
Since this is the base for all my measures, I really need this to work correctly.
Fun.pbix (1.3 MB)