Forum Discussion

ArchStanton's avatar
ArchStanton
Power Participant
3 years ago
Solved

Date Error in Measure

Hi,

 

The Measure below is producing the error message in yellow below it. 

 

Cases_Reopened = 
    VAR _lastdate = 
            CALCULATE(MAX('BAU Closures'[Month].[Date]),
            FILTER('BAU Closures','BAU Closures'[Cases Reopened] <> BLANK() )
            )
    RETURN
        CALCULATE(
                MAX('BAU Closures'[Cases Reopened]),
                FILTER ('BAU Closures','BAU Closures'[Month] = _lastdate)
        )

 

 

I've hidden the columns in the excel below. I just want to show the last Value in the Cases Reopened (V) column that is Not Blank.

BAU Closures Month Date is Col A below.

Any ideas why this is happening and how to fix?

 

Thanks,

  • Hi ArchStanton 

     

    Can you remove the .[Date]?

    CALCULATE(MAX('BAU Closures'[Month].[Date]),

     I think it is causing the problem

2 Replies

  • mlsx4's avatar
    mlsx4
    Memorable Member

    Hi ArchStanton 

     

    Can you remove the .[Date]?

    CALCULATE(MAX('BAU Closures'[Month].[Date]),

     I think it is causing the problem

    • ArchStanton's avatar
      ArchStanton
      Power Participant

      I removed the Date earlier and re error lines appeared in the RETURN part of the measure. 
      Typically, I've just removed Date again and no error messages1 Bizarre.

       

      Thankyou!! much appreciated.