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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
mluanacruz
Helper I
Helper I

How to get the product of a whole row of numbers

Hi, 
How do you get the same formula "product" from excel on power bi?
I have this measure that calculates the ratio of two dates and then I took a few different averages from this ratio measure like AVG 3, AVG 6.

My question is: How can I get the product of the average row?

here is my excel and power bi link: https://drive.google.com/drive/folders/1tw2kxHBZ93OjckLULVxbonYXQaWjPDld?usp=sharing

 

mluanacruz_0-1668117485192.png

 

Thanks in advance for the help.

Michelle


3 REPLIES 3
v-stephen-msft
Community Support
Community Support

Hi @mluanacruz ,

 

In DAX, there is the same PRODUCT function as in Excel. But it returns the product of the numbers in a column not a row.

PRODUCT function (DAX) - DAX | Microsoft Learn

You may first unpivot the columns to make rows convert to one column.

vstephenmsft_2-1669883853181.png

vstephenmsft_1-1669883784631.png

 

 

 

Best Regards,

Stephen Tao

 

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

 

Shaurya
Memorable Member
Memorable Member

Hi @mluanacruz,

 

You can use:

 

Product = IF('Table'[Period]="AVG 3", 'Table'[1-Ult],0) * IF('Table'[Period]="AVG 6", 'Table'[1-Ult],0)

 

Works for you? Mark this post as a solution if it does!
Check out this blog of mine: How to Export Telemetry Data from Azure IoT Central into Power BI

Hi @Shaurya ,
Thanks for the help.
I am trying to understand your measure. Did you have time to take a look at my Power BI one drive?

Product = IF('Table'[Period]="AVG 3", 'Table'[1-Ult],0) * IF('Table'[Period]="AVG 6", 'Table'[1-Ult],0)

 1) Are you multiplying the AVG 3 * AVG 6? Because my end goal is to get the product of the whole Average 3 row, like the picture, I attached below:

mluanacruz_0-1668122750348.png

 



2) Table[period] and Table[1-Ult] - Will the period be the date I am using? but what is Table[1-Ult]?

I am trying to understand a little bit better what you did.

Thanks again for the help.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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