Forum Discussion

spandy34's avatar
spandy34
Responsive Resident
2 years ago
Solved

View Records with the Maximum Date

I have the report below which lists projects of different Project Life Cycle Phase. I need to display each the maximum Due date for Project Life Cycle Phase relating to each project   Ive tr...
  • danextian's avatar
    2 years ago

    Hi spandy34 ,

     

    try this:

    CALCULATE (
        MAX ( 'tasks main'[due date] ),
        ALLEXCEPT (
            'tasks main',
            'tasks main'[mission],
            'tasks main'[project],
            'tasks main'[life cycle phase]
        )
    )
    
  • talespin's avatar
    2 years ago

    hi spandy34 

     

    Replace ORD_ID and MLSTN with the fields you want to get the maximum date for. Similarly you can add more fields.

    In CALCULATE , I am removing all filters and adding only those fielters for which I want to get the maximum date.

    This is a Calculated Column

    ------------------------------------

    Max Date by =
    VAR _Ord_ID = Orders[ORD_ID]
    VAR _MLSTN = Orders[MLSTN_CD]

    RETURN CALCULATE( MAX(Orders[RECEIVED DATE]), REMOVEFILTERS(), Orders[ORD_ID] = _Ord_ID && Orders[MLSTN_CD] = _MLSTN)