Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi,
I need help with PowerQuery - thanks in advance.
I have a table below:
I need to create a Custom Column in PowerQuery showing Max Date per Product.
Result in same table:
Thanks.
Solved! Go to Solution.
@Anonymous thanks.
Hi @mb0307
Have a try
let
Source = Table.FromRows(
Json.Document(
Binary.Decompress(
Binary.FromText(
"i45WMlTSUTIw1Dew1DcyMDJUitWBChlhChljCpmgCBkBhQwN9YEIVcgIU8gYU8gEIRQLAA==",
BinaryEncoding.Base64
),
Compression.Deflate
)
),
let
_t = ((type nullable text) meta [Serialized.Text = true])
in
type table [Product = _t, Date = _t]
),
#"Changed Type" = Table.TransformColumnTypes(
Source,
{{"Product", Int64.Type}, {"Date", type date}}
),
#"Grouped Rows" = Table.Group(
#"Changed Type",
{"Product"},
{{"Max", each List.Max([Date]), type nullable date}}
),
#"Merged Queries" = Table.NestedJoin(
#"Changed Type",
{"Product"},
#"Grouped Rows",
{"Product"},
"Grouped Rows",
JoinKind.LeftOuter
),
#"Expanded Grouped Rows" = Table.ExpandTableColumn(
#"Merged Queries",
"Grouped Rows",
{"Max"},
{"Max"}
)
in
#"Expanded Grouped Rows"
@Anonymous
Thanks for your response but I am struggling to execute the query due to my limited knowledge. Sorry about that.
I have updated the original post - basically I want result in same table. Is it possible to do in Custom Column window?
Thanks.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 9 | |
| 8 | |
| 8 | |
| 5 | |
| 5 |