Forum Discussion
arthur_gand
1 year agoFrequent Visitor
Help with M Code in Power BI: Splitting Policy Values and Creating New Rows
Hello everyone! I am working on a report in Power BI and need help modifying an M code. I have a data table that includes insurance information, and in some specific cases, I need to split the value...
Anonymous
1 year agoNot applicable
Hi arthur_gand ,
You can try these modifications, but this is just a reference and will have to be adjusted based on your actual data.
Separated the Selection of the Original Row:
OriginalRow = Table.SelectRows(#"Set Column Type VALUE", each [Policy] = "12345678" and [Client] = "SUPER STORES LTD"),
OriginalPremium = OriginalRow{0}[Premium],
OriginalCommission = OriginalRow{0}[Commission],
Defined Percentages Separately and transformed the List of Percentages into New Rows:
Percentages = [
{"SEGURO PLUS", 0.20},
{"PROTECTOR INSURANCE", 0.15},
...
],
AddRow = List.Transform(Percentages, each [
Client = OriginalRow{0}[Client],
...
]),
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
arthur_gand
1 year agoFrequent Visitor
It didn't work either, I continue with the lines the same way