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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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