Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
djr001
Frequent Visitor

Transform date to name of month but keep the column all the same month with different month dates

In this example, all of the transactions on this sheet belong to the accounting month for March. But one of the expenses which is April 1 was included in this report for whatever reason. However, it is part of that reporting period and there is no way to remove it. In this instance, I don’t want the name of the month to roll over to April and want the entire column to remain March. But I have 20 sheets that will have the same issue. And I don’t think replace values is going to be practical for each sheet one by one. How do I force the whole column to stay the same reporting month regardless of the invoice date?

 

Is this going to be complicated?

 

image001_b54633a7b995fc550aa4fa88e0b5ed57.png

 

 

1 ACCEPTED SOLUTION
drewlewis15
Solution Specialist
Solution Specialist

There might be an easier way to do this, but below is an option for you as long as you are trying to capture the month name of the earliest date in your table.

  1. Duplicate your Query
  2. Paste this into the Advanced Editor after your Source step:
    1. #"Removed Other Columns" = Table.SelectColumns(#"Changed Type",{"Invoice Date"}),
      #"Filtered Rows" = Table.SelectRows(#"Removed Other Columns", let earliest = List.Min(#"Removed Other Columns"[Invoice Date]) in each [Invoice Date] = earliest),
      #"Min Date" = #"Filtered Rows" {0} [Invoice Date]
      in
      #"Min Date"
  3. Change that query name to Min_Date
  4. In your original query, add a custom column with this following statement:
    1. =Date.MonthName(Min_Date)

 

And your end result will look something like this:

2018-01-29_14-14-50.jpg

View solution in original post

1 REPLY 1
drewlewis15
Solution Specialist
Solution Specialist

There might be an easier way to do this, but below is an option for you as long as you are trying to capture the month name of the earliest date in your table.

  1. Duplicate your Query
  2. Paste this into the Advanced Editor after your Source step:
    1. #"Removed Other Columns" = Table.SelectColumns(#"Changed Type",{"Invoice Date"}),
      #"Filtered Rows" = Table.SelectRows(#"Removed Other Columns", let earliest = List.Min(#"Removed Other Columns"[Invoice Date]) in each [Invoice Date] = earliest),
      #"Min Date" = #"Filtered Rows" {0} [Invoice Date]
      in
      #"Min Date"
  3. Change that query name to Min_Date
  4. In your original query, add a custom column with this following statement:
    1. =Date.MonthName(Min_Date)

 

And your end result will look something like this:

2018-01-29_14-14-50.jpg

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors