Hi @Zzy,
OK. Let’s try different approach
The following table was created using SUMMARIZE:
[MonthnYear] was added to sort the table.
UsingAllSelected_2 =
FILTER(
SUMMARIZE(
DimDate,
DimDate[MonthInCalendar],
DimDate[MonthnYear],
"@Total Amount", [Total Amount],
"@Cumulative", CALCULATE(
[Total Amount],
FILTER(
ALLSELECTED( DimDate ),
DimDate[MonthnYear] <= MAX( DimDate[MonthnYear] )
)
)
),
[@Total Amount] > 0
)
You can use it in a virtual table, like this one:
UsingAllSelected_2 VT =
VAR VT = FILTER(
SUMMARIZE(
DimDate,
DimDate[MonthInCalendar],
DimDate[MonthnYear],
"@Total Amount", [Total Amount],
"@Cumulative", CALCULATE(
[Total Amount],
FILTER(
ALLSELECTED( DimDate ),
DimDate[MonthnYear] <= MAX( DimDate[MonthnYear] )
)
)
),
[@Total Amount] > 0
)
VAR Result = MAXX( VT,[@Cumulative] )
Return
Result
In this case the measure is returning MAX from the column “@Cumulative” just to show that the virtual table is doing the job.
The result.
If this is not what you are looking for, could you please explain your assumptions a little further?
Summarize and Allselected_v3.pbix (79.0 KB)
Have a good day or night!
Mariusz