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.
- khush195 years ago
Resolver I
Hi Greg,
I am using Card,to investigate the issue i created table.
and seems like for some rows even i compare int column in max ,then also it doesnt return desired result
- v-diye-msft5 years ago
Community Support
Hi khush19
You might consider providing your dummy pbix that would be helpful for us to investigate it further.
You can upload it to the onedrive for business and share the link here. please don't forget to disclose the expected results and remove the confidential info.