Forum Discussion

walterdp's avatar
walterdp
Icon for Helper I rankHelper I
3 years ago
Solved

I need to extract absolute Firstdate and Lastdate for calculating average

Hi all:

 

I have a table a couple of columns with dates and other data. I need to calculate the average number of deployments per day, considering the complete time period between the oldest date and the newest one (that info changes when updating data on the table).

 

I created a couple of measures, using FIRSTDATE and LASTDATE, but the problem is that when I use a filter, those days change, based on the filter, and I need those days to be "absolute", based on the first and last date of the entire column, disregarding the filters.

 

I hope I'm clear enough.

 

Thanks in advance.

 

Have a great 2023!

 

W.

  • Hi walterdp,

     

    Wrap try the following measure:

    Min Date in Table=CALCULATE(MIN(Table[Column]),All())
    Max Date in Table =CALCULATE(MIN(Table[Column]),All())

    Please accept this solution if it resolves the query.

4 Replies

  • adudani's avatar
    adudani
    Icon for Memorable Member rankMemorable Member

    Hi walterdp,

     

    Wrap try the following measure:

    Min Date in Table=CALCULATE(MIN(Table[Column]),All())
    Max Date in Table =CALCULATE(MIN(Table[Column]),All())

    Please accept this solution if it resolves the query.
  • Hi,

    Share some data (in a format that can be pasted in an MS Excel file), explain the question and show the expected result.

  • Arul's avatar
    Arul
    Icon for Super User rankSuper User

    walterdp ,

    try this

    Min date = 
    MINX(ALL('Tablename'),'Tablename'[columnname])
    Max date = 
    MAXX(ALL('Tablename'),'Tablename'[columnname])

    Thanks,

    Arul