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

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

Reply
Don-Bot
Helper V
Helper V

How do I add a month name column without losing query folding

I currently have an aggregated query that is setup within power query.  I want to add the actual month name so I can do an aggregation to the creation table so that the queries bypass live queries for the end users.  However, everytime I add this in the custom columns I lose the "view native query" option

let
    Source = Ticket,
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Create_Date", type datetime}}),
    #"Removed Other Columns" = Table.SelectColumns(#"Changed Type",{"Company_ID", "Create_Date" }),
    #"Added Custom" = Table.AddColumn(#"Removed Other Columns", "Create_Month", each Date.StartOfMonth([Create_Date])),
    #"Inserted Year" = Table.AddColumn(#"Added Custom", "Creation Year", each Date.Year([Create_Date]), Int64.Type),
    #"Inserted Month" = Table.AddColumn(#"Inserted Year", "Creation Month", each Date.Month([Create_Date]), Int64.Type),
    #"Inserted Quarter" = Table.AddColumn(#"Inserted Month", "Creation Quarter", each Date.QuarterOfYear([Create_Date]), Int64.Type),
    #"Grouped Rows" = Table.Group(#"Inserted Quarter", {"Company_ID",  "Create_Month", "Creation Year", "Creation Month", "Creation Quarter"} ),
    #"Filtered Rows" = Table.SelectRows(#"Grouped Rows", each [Create_Month] >= RangeStart and [Create_Month] <= RangeEnd)
in
    #"Filtered Rows"

Is there a way I can do this with query folding as well?
I add this and the view native query option goes away

 

#"Inserted Month Name" = Table.AddColumn(#"Inserted Quarter", "Month Name", each Date.MonthName([Create_Date]), type text),
1 REPLY 1
Anonymous
Not applicable

Hi @Don-Bot ,

 

 If you're working within Power BI service and have access to Power BI Premium, consider using Dataflows with the Enhanced Compute Engine (ECE) to maintain query folding. Dataflows are designed to optimize query performance and support query folding even with custom columns. More information on this can be found here:

Develop solutions with dataflows - Power BI | Microsoft Learn

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.