Counting selected data point

Hi there,

I have a line chart and I have enabled the lasso rectangle selection of the file. I select few data points through lasso selection as shown in the picture:

In the above picture, I selected 5 data points. I want to create a measure that calculates the no of the selected data point. Could anyone help me in this regard?
Sample here
test.pbix (2.5 MB)

1 Like

@leo_89 ,

Give this a go:

Count Points Selected = 

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

I hope this is helpful. Full solution file attached.

3 Likes