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
Syndicate_Admin
Administrator
Administrator

Power Query Newbie - support with converting Excel formula to DAX

Hello! I'm a Power Query newbie, trying to create a Measure based on the following Excel formula: 

=(AG8*AE8*AH8*AJ8+(AG8*AE8*AH8))*AI8+(AG8*AE8*AH8*AJ8+(AG8*AE8*AH8))

 

but am running into issues. Have tried the SUMX, CALCULATE and PRODUCT functions, all without success. Have also tried creating variables relating to each separate part of the formula, with no luck.

 

Please help - am going slowly insane! 🙃

Thanks so much

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi Etta,

It seems that all calculations are done at the row level, do you want a calculated column like this?

vcgaomsft_0-1702264109167.png

 

Column = 
VAR Part1 = 'Table'[AG_col_name] * 'Table'[AE_col_name] * 'Table'[AH_col_name] * 'Table'[AJ_col_name]
VAR Part2 = 'Table'[AG_col_name] * 'Table'[AE_col_name] * 'Table'[AH_col_name]
VAR Part3 = 'Table'[AI_col_name]
RETURN (Part1 + Part2) * Part3 + Part1 + Part2

 

Please replace the column names with the column names in the actual model.
If I'm misunderstanding your needs, consider posting some sample data (simulated) and the expected output.

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Thank you so much @Syndicate_Admin! That's amazing. So grateful for your help 😊

v-cgao-msft
Community Support
Community Support

Hi Etta,

It seems that all calculations are done at the row level, do you want a calculated column like this?

vcgaomsft_0-1702264109167.png

 

Column = 
VAR Part1 = 'Table'[AG_col_name] * 'Table'[AE_col_name] * 'Table'[AH_col_name] * 'Table'[AJ_col_name]
VAR Part2 = 'Table'[AG_col_name] * 'Table'[AE_col_name] * 'Table'[AH_col_name]
VAR Part3 = 'Table'[AI_col_name]
RETURN (Part1 + Part2) * Part3 + Part1 + Part2

 

Please replace the column names with the column names in the actual model.
If I'm misunderstanding your needs, consider posting some sample data (simulated) and the expected output.

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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
Top Kudoed Authors