Forum Discussion
Inaccurate data with calculate function
- 5 years ago
v-yingjl thank you for taking a stab at this. Unfortunately Power BI wouldn't take the syntax of .Month or .Year.
The good news is that I have figured this out. In case anyone else ever runs into an issue like this, below is the summary.
I had understood max(invoice date) to be taking the maximum invoice date of the full data set and applying that 1 date value to all records in a table that would be displaying that measure. What I realized is that the max(invoice date) is actually separately evaluating each row/record in the table (i.e. taking the maximum invoice date for each row) which yields very different results, and tables where the totals (the only place that actually does use the full data set value) will not match the sum of the table.
v-yingjl thank you for taking a stab at this. Unfortunately Power BI wouldn't take the syntax of .Month or .Year.
The good news is that I have figured this out. In case anyone else ever runs into an issue like this, below is the summary.
I had understood max(invoice date) to be taking the maximum invoice date of the full data set and applying that 1 date value to all records in a table that would be displaying that measure. What I realized is that the max(invoice date) is actually separately evaluating each row/record in the table (i.e. taking the maximum invoice date for each row) which yields very different results, and tables where the totals (the only place that actually does use the full data set value) will not match the sum of the table.