Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I'm trying to convert the below calculated column in DAX to Power Query M language so the Calculated column can refresh with the scheduled refresh.
DAX for Calculated column is:
WS Name = CALCULATE(FIRSTNONBLANK('(Discount) Supplier Outlet'[Primary Wholesaler Name],1),FILTER(ALL( '(Discount) Supplier Outlet'),'(Discount) Supplier Outlet'[Outlet__c]='(Discount) Outlet Contract WS Number'[Outlet__c]))
Looking for the equivalent M language to generate an additioncal column in the table.
Solved! Go to Solution.
Hi @GeoffHill ,
Since the equiment dax formula in this case is min(), you can try this query:
MIN ( <column> ) = FIRSTNONBLANK ( <column>, 1 )
let
Source = Table.NestedJoin(#"(Discount) Outlet Contract WS Number", {"Outlet__c"}, #"(Discount) Supplier Outlet", {"Outlet__c"}, "(Discount) Supplier Outlet", JoinKind.LeftOuter),
#"Added Custom" = Table.AddColumn(Source, "Result", each List.Min([#"(Discount) Supplier Outlet"][Primary Wholesaler Name]),type text),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"(Discount) Supplier Outlet"})
in
#"Removed Columns"
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @GeoffHill ,
Since the equiment dax formula in this case is min(), you can try this query:
MIN ( <column> ) = FIRSTNONBLANK ( <column>, 1 )
let
Source = Table.NestedJoin(#"(Discount) Outlet Contract WS Number", {"Outlet__c"}, #"(Discount) Supplier Outlet", {"Outlet__c"}, "(Discount) Supplier Outlet", JoinKind.LeftOuter),
#"Added Custom" = Table.AddColumn(Source, "Result", each List.Min([#"(Discount) Supplier Outlet"][Primary Wholesaler Name]),type text),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"(Discount) Supplier Outlet"})
in
#"Removed Columns"
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Table.AddColumn(#"(Discount) Outlet Contract WS Number","WS Name",each List.Skip(Table.SelectRows(#"(Discount) Supplier Outlet",(x)=>x[Outlet__c]=[Outlet__c])[Primary Wholesaler Name],each _=null or _=""){0}?)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 18 | |
| 14 | |
| 11 | |
| 8 | |
| 8 |