Forum Discussion

ghetus's avatar
ghetus
Frequent Visitor
9 years ago
Solved

Previous date according filter

Hello! I have a problem with the calculation of the previous last active date or number (according to the filter). Example: I have column 'Date version' with values {24.07.2017; 31.07.2017; 07.0...
  • TomMartens's avatar
    TomMartens
    9 years ago

    Hey,

     

    here you will find a little example

     

    Now the adjusted measure considers the SELECTED DataVersions

    Here is the measure (I couldn't resist and just slightly changed the name of the new measure ;-))

    TomMartens Adjusted = 
    var currentSelection = CALCULATE(MAX('Table1'[DateVersion]))
    return
     MAXX(ALLSELECTED('Table1'[DateVersion]),
    	 IF('Table1'[DateVersion] < currentSelection, 'Table1'[DateVersion], BLANK())
     )

     

    Hope this helps