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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
D3nnisd
Frequent Visitor

DAX Product() function

Hi,

 

I'm a IT student currently self learning DAX as part of my upcomming internship.  I am using this guide to learn and Contoso Sales sample for this part.  So far its fairly straight forward, until now. I haven't been able to figure out the use of Product.

 

The guide tells me to use the Product() function and i'm just taking over what the guide says. But now i get a very different result than the guide tells me i should have.

 

The guide tells me that the result of using Simple Product = PRODUCT(Channel[Channel]) should be 24, but i get 0.791440856024882.  See the following screenshot for refference:

Product_function.PNG

As far as the guide tells me, product should have done 1 x 2 x 3 x 4 = 24 . The information on the MSDN docs doesnt tell me much either.

 

Anyone able to give me a answer?

 

Thanks allot!

 

Cheers, Dennis

 

1 ACCEPTED SOLUTION
marcorusso
Most Valuable Professional
Most Valuable Professional

The Channel column is defined as Whole Number, it should be a Decimal - do that and it returns 24.

That said - it's funny how it behave with an integer! I suggest submitting the issue to Microsoft.

 

Marco Russo - SQLBI

View solution in original post

8 REPLIES 8
D3nnisd
Frequent Visitor

@marcorusso@Greg_Deckler@Anonymous

 

It's a confirmed bug, it'll be fixed in November release!

 

 

Thanks for the input!

 

~ Dennis

D3nnisd
Frequent Visitor

Alright , Thanks !

 

I have made a bug report here: https://community.powerbi.com/t5/Issues/Product-not-giving-right-results-if-data-type-is-a-whole-num...

 

Thanks for the information! I'll keep on learning :)!

 

 

Greg_Deckler
Community Champion
Community Champion

Wow, I've been experimenting with this and I can't make heads or tails of what the PRODUCT function is doing. I get some bizarre results such as infinity, etc. that make absolutely no sense what-so-ever. @marcorusso do you have any idea what the PRODUCT function is doing here because it certainly does not seem like it is returning the PRODUCT of a column. I cannot make heads or tails of what it is actually doing.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
marcorusso
Most Valuable Professional
Most Valuable Professional

The Channel column is defined as Whole Number, it should be a Decimal - do that and it returns 24.

That said - it's funny how it behave with an integer! I suggest submitting the issue to Microsoft.

 

Marco Russo - SQLBI

Thanks @marcorusso ,  @Greg_Deckler and @Anonymous for replying!

 

Changing it to a decimal did the trick.

This raises 2 questions:

 

- Where is that 0.79 comming from?

- What is the absolute diffrence between a whole number and a decimal. Can the decimal be seen as a float and a whole number as a integer?  But this still doesnt explain where the 0.79 come from.

 

I will report the issue to Microsoft.

marcorusso
Most Valuable Professional
Most Valuable Professional

Yes, decimal is a float and whole number is an integer.

I don't know why there is this bug - I just imagined that PRODUCT is a function designed to work with decimal numbers because you usually use it to compute compound interests. However, it should work with integers too - Microsoft should answer for that, I would say it's a bug.

 

Marco Russo - SQLBI

Thanks @marcorusso, that does solve the issue by making it a decimal number. But, as you said, weird!! I have be believe that is a bug.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I can get productx to give the expected result

 

For example on a table consisting of integers 1-9

 

Measure = 

PRODUCTX ( VALUES ( Table1[Column1] ), Table1[Column1] )

 

returns 362,880 as expected.

 

However, 

Measure = 

PRODUCTX ( Table1, Table1[Column1] )

 

returns 0

 

Which is identical to just PRODUCT() doesnt return the expected result.

 

So a workaround for this is to use PRODUCTX over VALUES however as for why PRODUCT itself isnt behaving as expected I have no idea. My instinct is that this is a bug but I cant be sure.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.