Forum Discussion

kamiluc's avatar
kamiluc
Helper I
2 years ago
Solved

Help finding issue in measure

Hi, I have a table (RISK_EVALUATION) that contains risk evaluations for RISKIDs (can be multiple) along with dates and outcomes. I then created a measure that I intent to include in a matrix to coun...
  • kamiluc's avatar
    2 years ago

    I have figure it out. My error was on the variable tmp1 which was producing a table with the latest date for all RISKIDs, rather than the latest for each RISKID.

     

    I've replaced that variable by the following:

     

    var tmp1 = 
    SUMMARIZE(
    FILTER(
    FILTER(RISK_EVALUATION,RISK_EVALUATION[RE_DATE]<=_selectdate),
    RISK_EVALUATION[RE_DATE]
    = CALCULATE (
    MAX ( RISK_EVALUATION[RE_DATE] ),
    ALLEXCEPT ( RISK_EVALUATION, RISK_EVALUATION[RISKID] )
    )
    ),[RISKID],[RE_DATE])

     

    This actually eliminates the need for the variable tmp as well.