Forum Discussion
JKoivu
5 years agoHelper I
Simple calcuation behaves oddly
Hi, I have a measure DAX similar to this example: Distance exceeded = VAR distance = MAX(MyTable[Distance from previous]) VAR maxDistance = [Max distance] VAR fraction = distance / maxDistance ...
- 5 years ago
Hi. Yes my issue is resolved, the reason was that there was a very obvious calculation error in my measure, which I failed to notice due to time pressure. Also the reason I was getting weird values for the calculation was because I put this measure in a table (for debugging purpose), and that messed up the context. So basically my whole question is not really valid...
Fowmy
5 years agoSuper User
JKoivu
I am not reading the logic here, are you trying to get something like this. Can you explain your desired results if this is not the solution?
Distance exceeded =
VAR distance = 15000//MAX(MyTable[Distance from previous])
VAR maxDistance = 10000 //[Max distance]
VAR fraction = distance / maxDistance
RETURN
if(fraction > 1 , fraction + 1, fraction)
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply š