Sum of lasso selection from visual

@leo_89 ,

To get this to work, you just need to build out a bit of additional context in a short virtual table. We can use the same virtual table that we created in the thread about counting Lasso-selected points, but instead of COUNTROWS, we use SUMX to get the total of the points selected:

Sum of Points Selected =

VAR vTable =
ADDCOLUMNS(
    VALUES( Test[Date] ),
    "@valmeas", [value_measure]
)
VAR Result =
CALCULATE(
    SUMX( vTable, [@valmeas] ),
    ALLSELECTED( Test[Value] )
)
RETURN Result

I hope this is helpful. Full solution file attached.

1 Like