Forum Discussion
Filter on datetime column sometime work ,sometime not
HI Greg,
I have data like :
now i need to get Amount based on max (currenttime).
For this i created a measure and this measure is used in many measure to calculate difference ,% change.
and the worst part is it,this measure works sometimes and sometimes not.
and it work in SIT,UAT and fail only in PROD 😞
khush19 First, not typing that data into an Enter Data query to mock this up, please post as text.
Second, what do you mean by the MAX of currenttime? If you have a measure and you put it in a visual along with currenttime column then if you get the MAX of the currenttime, you are getting that row's currenttime, which is already in context so you don't need to filter on it because that row in the table visualization and already filtered to that currenttime which is why your formula seems like it is equivalent to SUM([totalamount])
In other words, if I had data like:
Color
Red
Orange
Blue
And I create a measure like:
Measure = MAX([Color])
This would return the exact same thing as:
Measure = CALCULATE(MAX([Color]),FILTER('Table',[Color]=MAX([Color])))
So, should your measure work? Yes, but it is unnecessarily complicated.