Forum Discussion
DAX formula calculation gives wrong value!?
- Anonymous3 years ago
Hi Anonymous ,
There seems nothing error with the measure.
LTCR = DIVIDE([FirstValue] - MIN('Piping UT ex'[Tmin (mm)]), [LTC])We can calculate the ([FirstValue] - MIN('Piping UT ex'[Tmin (mm)]) first.
This part calculates well.
Let me check the measure [LTC].
LTC = ([FirstValue] - [LastValue]) * 1.33First LTC result is (12.9-12.54)=0.36. 0.36*1.33=0.4788.
Then 9.5/0.4788=19.84.
If you want the reslut 19.84 change to be 19.79. Please try to change the measure [LTC].
LTC = var _1= ([FirstValue] - [LastValue]) * 1.33 return ROUND(_1,2)Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Where does 'Piping UT ex'[Tmin (mm)] column come from? A seperate table?
If yes, would be good to include a screenshot of your data model so we can understand the relationships.
If it's the same table then katika555 answer should solve the issue for you.
- Anonymous3 years agoNot applicable
It is one simple table, no relationships involved
- KNP3 years agoSuper User
Ok, always best to post this detail at the begining.
Try to include sample data as data (not screenshot) as it makes it easier to provide an answer.
Depending on where else you use the measure, this may give you what you want.
LTCR = DIVIDE ( [FirstValue] - MIN ( 'Piping UT ex'[Tmin (mm)] ), [LTC] )In the row context of that table, this will work fine.
- Anonymous3 years agoNot applicable
OK, I omitted to explain a bit better, but considering the issue (calculation result) that it works for one measure but it gives wrong results for another with same formula.
Still I changed values with min and there is no change in results. I don't know how to add the pbix or data sample to this discussion.