Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Get next month based on status

Hi All,

 

I would like to get next month from a column "Modified" (which is of date data type). if the status column is "Completed".

 

something like this.

MeasureNextmonth = if (status == 'Completed')

{

NEXTMONTH('Tablename'[Modified])

}

 

also in dax function i can only access measure colums. How do i write expressions based on default columns loaded during transformation stage

6 Replies

  • nvprasad's avatar
    nvprasad
    Icon for Solution Sage rankSolution Sage

    Hi,

     

    Try below measrue

     

    Measure Nextmonth = IF (Status = "Modified",  EOMONTH(H10,0)+1 , EOMONTH(H10,-1)+1)

     

    This gives next month first date by defualt and you can use format function to get desired format.

     

    Appreciate a Kudos! 🙂
    If this helps and resolves the issue, please mark it as a Solution! 🙂

    Regards,
    N V Durga Prasad

  • Anonymous , not very clear, Measure would be like

    if (max(status) = 'Completed',NEXTMONTH('Tablename'[Modified]),blank())