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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Calculate multiple columns

Hello Experts,

 

I am new to DAX queries. I am trying to calculate following fields, but unable to do so.

 

Column AColumn BColumn CColumn D
85393021

 

my goal is to calculate like this,

 

ColumnA + Column B + Columm C / Column D

 

Would be great help if you could help me with this

 

regards

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello Ankit,

 

Thanks for your response. I was able to derive accrurate figure based on the script mentioned below. Not sure why.

 

Instead, i wrote below one and got the correct answer

 

divide(Table[Column1] + Table[Column2] + Table[Column3], Table[Column4])

 

regards

View solution in original post

3 REPLIES 3
AnkitKukreja
Super User
Super User

Hi @Anonymous 

 

Please use this. I've shared the output below.

DIVIDE( SUMX( 'Table' , 'Table'[Column1] + 'Table'[Column2] + 'Table'[Column3] ) , 
        SUMX( 'Table' , 'Table'[Column4] ) )

Capture.JPG
 
Thanks,
Ankit Kukreja
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
Anonymous
Not applicable

Hello Ankit,

 

Thanks for your response. I was able to derive accrurate figure based on the script mentioned below. Not sure why.

 

Instead, i wrote below one and got the correct answer

 

divide(Table[Column1] + Table[Column2] + Table[Column3], Table[Column4])

 

regards

Yeah both would work. There are lot of scenarios where multiple solutions are possible.
I'm glad that you were able to solved it.

 

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

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors