March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I have a data model in Power BI. I am having an issue that I have zero clue how to debug. I'm trying to figure out why a few of my measures (in this example, Mileage (Avg) ) do not match the source data. The calculation is a weighted average below:
Where are the other numbers coming from (158,100 and 4,100)? What could possibly cause this issue?
Solved! Go to Solution.
Hey @rawiswarden ,
without having the data, it's almost impossible to guess where the data is coming from (at least for me), but I'm pretty sure that Power BI does not "invent" data.
Besides that, I would recommend to re-write the measure like this, as it iterates across the table Facts_PortStats just once:
Mileage (Avg) =
sumx(
Facts_PortStats
, calculate(
divide(
Facts_PortStats[PortStats.Mileage]
* Facts_PortStats[PortStats.DiscountedLoanAmount]
/ Facts_PortStats[PortStats.DiscountedLoanAmount]
)
, userelationship(Facts_PortStats[PortStats.BookedDate], Calendar_Dates[Date])
)
)
But maybe this is already some kind of solution.
Regards,
Tom
Hey @rawiswarden ,
without having the data, it's almost impossible to guess where the data is coming from (at least for me), but I'm pretty sure that Power BI does not "invent" data.
Besides that, I would recommend to re-write the measure like this, as it iterates across the table Facts_PortStats just once:
Mileage (Avg) =
sumx(
Facts_PortStats
, calculate(
divide(
Facts_PortStats[PortStats.Mileage]
* Facts_PortStats[PortStats.DiscountedLoanAmount]
/ Facts_PortStats[PortStats.DiscountedLoanAmount]
)
, userelationship(Facts_PortStats[PortStats.BookedDate], Calendar_Dates[Date])
)
)
But maybe this is already some kind of solution.
Regards,
Tom
Thanks for the tip! I will use it.
I decided to roll back Power BI file to an older version and the issue is gone away. I don't know what happened, but a few buggy things happened in my file (M query statements that have worked for months started to fail on refresh, the data mapping was all incorrect for all but a subset of accounts). Now my file is back to showing the correct data .
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
82 | |
69 | |
53 | |
44 |
User | Count |
---|---|
202 | |
106 | |
100 | |
64 | |
56 |