Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi
Please help me
I subscribed to Cluster API on azure data marketplace,
I tried to "score" my columns for it to return cluster, the below is my M function. I used energy dataset.
My question is how do I pass 2 parameters in this statement?
#"Grouped Rows" = Table.Group(#"Changed Type1", {"YEAR", "k"}, {{"Data", each Score(_), type record}})
where each Score("this is the record", "this is K")
I tried each Score(_,"5") where 5 is k value but it doesnt like that 😞
Help plz
let
Source = Csv.Document(File.Contents("energy.csv"),[Delimiter=",", Columns=27, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"STATE", type text}, {"YEAR", Int64.Type}, {"GenTotal", type number}, {"GenHydro", type number}, {"GenSolar", type number}, {"GenTotalRenewable", type number}, {"GenSolarBinary", Int64.Type}, {"GenTotalRenewableBinary", Int64.Type}, {"AllSourcesCO2", type text}, {"AllSourcesSO2", type text}, {"AllSourcesNOx", type text}, {"EPriceResidential", type number}, {"EPriceCommercial", type number}, {"EPriceIndustrial", type number}, {"EPriceTransportation", type number}, {"EPriceTotal", type number}, {"EsalesResidential", type number}, {"EsalesCommercial", type number}, {"EsalesIndustrial", type number}, {"EsalesTransportation", type number}, {"EsalesOther", type text}, {"EsalesTotal", type number}, {"CumlFinancial", Int64.Type}, {"CumlRegulatory", Int64.Type}, {"Total.salary", type number}, {"presidential.results", Int64.Type}, {"Import", Int64.Type}}),
#"Removed Other Columns" = Table.SelectColumns(#"Changed Type",{"YEAR", "GenTotal"}),
#"Added Custom" = Table.AddColumn(#"Removed Other Columns", "k", each "5"),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"k", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type1", {"YEAR", "k"}, {{"Data", each Score(_), type record}})
in
#"Grouped Rows"
Hi @Anonymous,
Since I'm not clear your function, can you provide more detail information about the "Score" function or share me a sample file?
Do you want to get the below effect?
If as I said, you can refer to below formula:
#"Grouped Rows" = Table.Group(#"Added Custom", {"Year", "k"}, {{"Data",each {_{0}[Year]&","&_{0}[k]},type record}})
Regards,
Xiaoxin Sheng
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
117 | |
110 | |
109 | |
93 | |
69 |
User | Count |
---|---|
173 | |
135 | |
131 | |
96 | |
94 |