Forum Discussion

varshajain's avatar
varshajain
Microsoft Employee
4 years ago
Solved

Get User selected dates in date range

I have a DAX function to retrieve teh date range that user has selected Dates = var _max = maxx(allselected('Candidates'[CreateDate]),'Candidates'[CreateDate]) var _min = minx(allselected('Candida...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  varshajain ,

    Here are the steps you can follow:

    1. Create measure.

    mindate =
    var _minx=MINX(ALLSELECTED('Table'),[Date])
    var _maxx=MAXX(ALLSELECTED('Table'),[Date])
    return
    DATE(YEAR(_minx),MONTH(_minx),1)
    mindate =
    var _minx=MINX(ALLSELECTED('Table'),[Date])
    var _maxx=MAXX(ALLSELECTED('Table'),[Date])
    return
    DATE(YEAR(_minx),MONTH(_minx),1)

    2. Result:

    If you need pbix, please click here.

    Get User selected dates in date range.pbix

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly