Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Dax - using calculate, filter and lastdate

Hi there,   I have a column of values called PF1.1.totalTime. I also have a column of dates corresponding to each value, this column is called UTC Finish Time. The column of dates has many repeated...
  • parry2k's avatar
    7 years ago

    Anonymous you are getting caught into ROWCONTEXT, you need to understand why lastdate works when you throw on visual card but in DAX. Can you post sample data here and expected output and that will help to provide the solution. 

     

    Do you want LASTDATE across full dataset? Try following measure

     

    Measure = 
    VAR __lastDate=CALCULATE(  LASTDATE('All PF1 Data (2)'[UTC Finish Time]), ALL() )
    RETURN
    CALCULATE(PERCENTILE.INC('All PF1 Data (2)'[PF1.1.totalTime],0.95), 
     'All PF1 Data (2)'[UTC Finish Time] = __lastDate)