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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Group multiple values on the same date in Query Editor

I have copied my main data sheet and removed all columns except for date calculated by start of week and the mulitple price values, so I have (chart below), is there a way to get the average price per day via DAX / Query Editor?

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

@Anonymous 

the easiest way is to add both columns to visual and set aggregation as "Average" for Price field in visual settings

It doesn't demand any programming


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

2 REPLIES 2
dax
Community Support
Community Support

Hi @Anonymous ,

You could refer to @az38 's suggestions to use average in visual or you also could try to use below M code 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMrDUNzDWNzIwMlDSUTLRMzVWitXBELW0IF7U1BBT1FTPCJtSA6gBRiii5saYoqYwtUYm+kAJqKgZ1FgUQYi7YgE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [#"Date " = _t, value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date ", type text}, {"value", type number}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Date "}, {{"avg", each List.Average([value]), type number}, {"all", each _, type table [#"Date "=text, value=number]}}),
    #"Expanded all" = Table.ExpandTableColumn(#"Grouped Rows", "all", {"value"}, {"value"})
in
    #"Expanded all"

Best Regards,
Zoe Zhi

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

az38
Community Champion
Community Champion

@Anonymous 

the easiest way is to add both columns to visual and set aggregation as "Average" for Price field in visual settings

It doesn't demand any programming


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.