Forum Discussion

PBIBeginner2022's avatar
PBIBeginner2022
Icon for Helper III rankHelper III
4 years ago
Solved

Create a column with only dates of the current month

Hi everyone,     I have this column in my date table with date between 1899 to 2201 :   I need to create an other column in this table with dates of all day in current month. We are in jul...
  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    4 years ago

    You can use either of the formulas, second was provided by BA_Pete 

    = if Date.ToText([DateRef],"yyyyMM")=Date.ToText(Date.From(DateTime.FixedLocalNow()),"yyyyMM") then [DateRef] else null
    = if Date.IsInCurrentMonth([DateRef]) then [DateRef] else null