Forum Discussion
Dax functions returns incorrect values
- 4 years ago
after trying different ways to get the correct result, I got the solution to work in a new temporary table, I tried to use it directly in the same function, using summarize as parameter but it didn't work, however creating a table with the same formula the data shown were correct.
JavierCL It's hard to know for sure what is going on. I am pretty confident that functions like MAX and MAXX work perfectly fine but you need to understand how DAX works. For example, you don't need the CALCULATE in your first formula. Would need more information and sample data posted as text to replicate the issue you are having and figure out where the issue is.
Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
sorry, I got the formula wrong because I was trying to make a temporary table and filter it by another field, I leave updated the image with the basic formula failing too.
the previous data we have is from 3 - 4 months ago. as I say the calculate is a residual error that I have left unintentionally after trying a thousand different ways, I have been more than 2 weeks searching, testing and simplifying to the minimum as max or min value and it does not work... 😞
thank you for your response and help