Forum Discussion

NZemel's avatar
NZemel
Advocate I
9 years ago
Solved

Segmenting for all dates before current month

How do you set up that Power BI in query editior will automatically go back a month and take everything from before the current month?

 

Is this the sort of thing which I will need some DAX?

  • Hi NZemel,

     

    If you need to display only current month data, you can add a calculated column use the DAX below.
    Column = IF(FORMAT('Table2 (2)'[Date],"YYYYMMM")=FORMAT(TODAY(),"YYYYMMM"),"Current Month","Hisstory Data")

     

    Regards,

    Charlie Liao

     

1 Reply

  • v-caliao-msft's avatar
    v-caliao-msft
    Microsoft Employee

    Hi NZemel,

     

    If you need to display only current month data, you can add a calculated column use the DAX below.
    Column = IF(FORMAT('Table2 (2)'[Date],"YYYYMMM")=FORMAT(TODAY(),"YYYYMMM"),"Current Month","Hisstory Data")

     

    Regards,

    Charlie Liao