Forum Discussion
Anonymous
3 years agoNot applicable
Code this DAX formula in M
Hello, I would like to code this DAX formula in Power Query M ? What is the solution please ? Lat = var Notif='TASK'[Notification] var Task_Number='TASK'[Task number] var Task_Number_...
wdx223_Daniel
3 years agoCommunity Champion
let
Source=TASK,
Custom1=let a=Table.Group(Source,"Notification",{"n",each Table.Sort(_,"Task number"){0}[Latitude]}) in Table.AddColumn(Source,"lat",each a{[Notification=[Notification]]}[n])
in
Custom1
Anonymous
3 years agoNot applicable
Hello, thank you for your help. It says "Expression.Error: A cyclic reference was encountered during evaluation."
- wdx223_Daniel3 years agoCommunity Champion
let
Source=TASK,
Custom1=Table.FromRecords(List.Accumulate(Table.ToRecords(Table.Sort(Source,{"Notification","Task number"})),{{},"",0},(x,y)=>if x{1}=y[Notification] then {x{0}&{y&[lat=x{2}]]},x{1},x{2}} else {x{0}&{y&[lat=y[Latitude]]},y[Notification],y[Latitude]}){0})
in
Custom1