Forum Discussion

vojtechsima's avatar
vojtechsima
Super User
4 years ago
Solved

Virtual Table inside Measure - strange behaviour

Hi, guys, I got stuck on one issue and I can't figure out why it works like that. I mean I have an idea, but it is still strange. I have this sample data: FlightDate|Number|DepartureTime ...
  • johnt75's avatar
    4 years ago

    You can use

    Num Different Flights = 
    var currentNumber = SELECTEDVALUE(Flights[Number])
    var summaryTable = CALCULATETABLE( SUMMARIZE( Flights, Flights[FlightDate]), REMOVEFIlTERS(Flights), Flights[Number] = currentNumber)
    return COUNTROWS( summaryTable )
  • CNENFRNL's avatar
    4 years ago

    I don't see any necessity of complexity according to your description in case of such a simple question.