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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Syndicate_Admin
Administrator
Administrator

Dax. Error Adding Rows

Good.

I am doing some calculations and I get an error when adding it in DAX, but if it works correctly if I calculate it in power Query.

I have this table to calculate the total

I created the column in power query and the sum of values are correct:

Total2 = Quantity * Precio_Medio * Sign

Aguirre_2-1674123882299.png

I want to do this same with DAX, for that I have calculated.

Quantity = SUM(F_BI[QUANTITY])
Price = AVERAGE(F_BI[PRECIO_MEDIO])
Sign = AVERAGE(F_BI[Sign])
Total = ([Quantity] * [Price])*[sign]

Aguirre_5-1674124632838.png

As you can see, the total sum is different, although the calculation of each line is correct. The good solution is -256.356€

Some idea that I'm doing wrong in DAX.

Thank you.

Greetings.

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

Perfect, now if the sum is good for me.

Thanks a lot.

Greetings.

Aguirre_0-1674127222716.png

Mikelytics
Resident Rockstar
Resident Rockstar

Hi @Syndicate_Admin 

 

Please try a measure like this:

 

 

Multiply AMount and Price =
SUMX(
   TableName,
   [ColumnAmount]*[ColumnPrice]
)

so I assume it would lookm like this

Multiply Amount and Price =
SUMX(
    F_BI,
    F_BI[QUANTITY]*F_BI[PRECIO_MEDIO]*F_BI[Sign]
)
    

 

Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

@Syndicate_Admin 

and pleaase use it as a measure not as a calculated column.

 

Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

If yes, it is that the column was to check that everything was correct. I'll stick with the measure.

Greetings.

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.