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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
faiqsadiq1
Frequent Visitor

I Need to add these two coloumns but i am unable to add them Cost per sale and net revenue per piece

cos.pngNR.png

2 REPLIES 2
AnkitKukreja
Super User
Super User

Hi! @faiqsadiq1 

 

Use the below m-code or dax and it should work for you.

Addition = ( 'Table'[Sales per piece] + 'Table'[Net Revenue] )


let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("bY7BEYAwCAR7yVuZC+ABtTjpvw0zal76Zed2Oc+2h0A9CsECFNq2VqLRxjbhISTqYHWGMvyGqAdS0rKrZYKWVjfsupblDiNdLdA5YQpfrf81613GX1NtaT/NnKel/TTnt2hjXA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Sales per piece" = _t, #"Net Revenue" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Sales per piece", type number}, {"Net Revenue", type number}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each ( ( [Sales per piece] ) + [Net Revenue] ))
in
#"Added Custom"

If this doesn't work. Can you please copy-paste the data or share the sample data to have a look at your issue, I am unable to access your file.

For Power BI trainings or support dm or reach out to me on LinkedIn.
If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.

Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

Hey Ankit,
Thankyou for the solution.

I tried it but i was unable to find this way but then i tried group by and it worked.
Thankyou for the utmost support.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.