Results 1 to 1 of 1

Thread: PQ- End of previous month

  1. #1
    Sir Moderator sandy666's Avatar
    Join Date
    May 2018
    Posts
    234
    Rep Power
    7

    Cool PQ- End of previous month

    DateNow DateNow EndOfPrevMonth
    05/07/2023
    05/07/2023
    30/06/2023


    Code:
    // Table1
    let
        Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        Type = Table.TransformColumnTypes(Source,{{"DateNow", type date}}),
        EOPM = Table.AddColumn(Type, "EndOfPrevMonth", each Date.EndOfMonth(Date.AddMonths([DateNow], -1)), type date)
    in
        EOPM
    or

    EndOfPreviuosMonth
    30/06/2023


    // EndOfPreviuosMonth
    Code:
    let
        Source = Date.From(Date.EndOfMonth(Date.AddMonths(DateTime.LocalNow(), -1)))
    in
        Source
    Last edited by sandy666; 07-10-2023 at 08:25 PM.
    sandy
    I know you know but I forgot my Crystal Ball and don't know what you know also I may not remember what I did weeks, months or years ago so answer asap. Thinking doesn't hurt

Similar Threads

  1. File Name previous/next
    By PcMax in forum Excel Help
    Replies: 3
    Last Post: 10-23-2014, 05:54 PM
  2. Replies: 9
    Last Post: 04-23-2014, 04:16 PM
  3. Replies: 2
    Last Post: 08-22-2013, 12:23 AM
  4. VBA - Find Last End Value
    By ivandgreat in forum Excel Help
    Replies: 3
    Last Post: 05-02-2013, 10:37 AM
  5. How to Lock or Unlock row basis previous cell input?
    By Rajesh Kr Joshi in forum Excel Help
    Replies: 2
    Last Post: 07-25-2012, 02:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •