Forum Discussion

thenerv25's avatar
thenerv25
Frequent Visitor
5 years ago
Solved

Inaccurate data with calculate function

I have a calculated column (YTD Revenue) that is displaying accurate totals (when compared to the source file), but the line level detail (when displaying with another attribute in the same table) is...
  • thenerv25's avatar
    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.