Why is my DAX measure returning incorrect results for calculated totals even though row-level calculations are correct

0 votes
Why is my DAX measure returning incorrect results for calculated totals, even though row-level calculations are correct?

In some cases, a DAX measure may calculate row-level values correctly but return inaccurate totals. Why might this happen, and how can DAX formulas be adjusted to ensure that totals are computed correctly across all rows?
Nov 6 in Power BI by Evanjalin
• 6,910 points
59 views

1 answer to this question.

0 votes
  • It is quite common for DAX measures in Power BI to produce incorrect totals, although they may perform correctly for row-level calculations. This phenomenon usually happens because the interpretation of totals in DAX is inconsistent with row-wise calculations. More specifically, DAX totals are often not even close to the simple math of summing individual calculations – rather, totals are taken from the results over all rows or some of the rows, but not necessarily adding the individual calculations together. In fact, totals quite often utilize the entire table or pertinent carried-over measure context, which can lead to surprises if the measure definition is not modified to fit that larger picture.

  • One reason for this is how DAX differentiates between row context and filter context. Row-level calculations are usually confined within the row context, and they assess each row separately. However, when summing up a measure, DAX provides a filter context that includes all available rows under the specified filter. Unless the DAX expression is carefully designed to incorporate this difference, the total value of the measure will differ from what was intended.

  • In such cases, you can often modify the DAX formula to specify the total to be computed in the desired way. For example, including the SUMX, AVERAGEX, or CALCULATE functions in your measure will make sure that aggregation is done after invoking the measure on each row. Also, SUMX allows for greater manipulation of the grand’s total as it calculates the given expression to each row of the entered table and adds the results. With such functions incorporated in the preparation of DAX measures, one can bring about the total calculation that corresponds with the calculation meant for each row, making all rows give the correct results.
answered Nov 6 by pooja
• 6,530 points

Related Questions In Power BI

0 votes
0 answers

Why is my DAX measure displaying incorrect values when using time intelligence functions?

Why is my DAX measure displaying incorrect ...READ MORE

Nov 7 in Power BI by Evanjalin
• 6,910 points
36 views
0 votes
1 answer
0 votes
1 answer

Why is my Power BI matrix/table visual displaying duplicate rows or incorrect totals?

When you encounter a situation where there ...READ MORE

answered Nov 11 in Power BI by pooja
• 6,530 points
49 views
0 votes
1 answer

Displaying Table Schema using Power BI with Azure IoT Hub

Answering your first question, Event Hubs are ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,341 views
+1 vote
1 answer

Unable to install connector for Power Bi and PostgreSQL

I think the problem is not at ...READ MORE

answered Aug 22, 2018 in Power BI by nirvana
• 3,130 points
2,738 views
+2 votes
2 answers

Migrate power bi collection to power bi embedded

I agree with Kalgi, this method is ...READ MORE

answered Oct 11, 2018 in Power BI by Hannah
• 18,520 points
1,510 views
+1 vote
1 answer

Connect power bi desktop to dataset and create custom reports

Yes using Power BI REST API to ...READ MORE

answered Sep 18, 2018 in Power BI by Kalgi
• 52,350 points
1,658 views
0 votes
1 answer

Why is my DAX measure displaying incorrect values when using time intelligence functions?

Erroneous output is typical when using DAX ...READ MORE

answered Nov 12 in Power BI by pooja
• 6,530 points
55 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP