Forum Discussion

rawiswarden's avatar
rawiswarden
Helper I
6 years ago
Solved

Displayed Numbers Do Not Match Source

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...
  • TomMartens's avatar
    6 years ago

    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