Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
shri0025
Helper II
Helper II

Create Column

Hi  Team 

Please help me    i need  new Column     Gate entery Basis  if  gatey entery multipule  i need single amount  Freight amount   Like my output.

 

Gate entryFreight Amount
CDA103129312850
CDA103129312850
CDA103129812000
CDA103129812000
CDA103129812000
CDA103129812000
CDA103129812000
CDA103133112000
CDA103133112000
CDA103141112100
CDA103141112100
CDA103142412100
CDA103142412100
CDA103142412100
CDA103142412100
CDA103148212800
CDA103148212800
CDA103148212800
CDA103148212800
CDA103148212800
CDA103148212800
CDA103148212800
CDA103148212800
CDA103148212800
CDA103148212800
CDA103149312200

 

Output

 

Gate entryFreight AmountCreate Column
CDA10312931285012850
CDA103129312850 
CDA1031298120001200
CDA103129812000 
CDA103129812000 
CDA103129812000 
CDA103129812000 
CDA10313311200012000
CDA103133112000 
CDA10314111210012100
CDA103141112100 
CDA10314241210012100
CDA103142412100 
CDA103142412100 
CDA103142412100 
CDA10314821280012800
CDA103148212800 
CDA103148212800 
CDA103148212800 
CDA103148212800 
CDA103148212800 
CDA103148212800 
CDA103148212800 
CDA103148212800 
CDA103148212800 
CDA10314931220012200

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @shri0025 

 

You can try the following methods. Adding an index column in the Power Query.

vzhangti_0-1697622497277.png

vzhangti_2-1697622521351.png

Dax column:

Column = Var _minindex=CALCULATE(MIN('Table'[Index]),FILTER('Table',[Gate entry]=EARLIER('Table'[Gate entry])))
Return
IF([Index]=_minindex,[Freight Amount])

vzhangti_3-1697622645630.png

Is this the result you expect? Please see the attached document.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @shri0025 

 

You can try the following methods. Adding an index column in the Power Query.

vzhangti_0-1697622497277.png

vzhangti_2-1697622521351.png

Dax column:

Column = Var _minindex=CALCULATE(MIN('Table'[Index]),FILTER('Table',[Gate entry]=EARLIER('Table'[Gate entry])))
Return
IF([Index]=_minindex,[Freight Amount])

vzhangti_3-1697622645630.png

Is this the result you expect? Please see the attached document.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Ahmedx
Super User
Super User

pls try this

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnZxNDQwNjSyNFbSUTI0sjA1UIrVISxsARY2MKCbsLGxIQnCJoYQYUPihI1MaCdsYQQJweEtDE0nRiDhWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Gate entry" = _t, #"Freight Amount" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Gate entry", type text}, {"Freight Amount", Int64.Type}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Gate entry"}, {{"Count",
 each  Table.AddIndexColumn(_ , "indx",1,1)}}),
    #"Removed Other Columns" = Table.SelectColumns(#"Grouped Rows",{"Count"}),
    #"Expanded Count" = Table.ExpandTableColumn(#"Removed Other Columns", "Count", {"Gate entry", "Freight Amount", "indx"}, {"Gate entry", "Freight Amount", "indx"}),
    #"Added Custom" = Table.AddColumn(#"Expanded Count", "Result", each if[indx] =1 then [Freight Amount] else 0),
    #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"indx"})
in
    #"Removed Columns"

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.