cancel
Showing results for
Did you mean:

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Frequent Visitor

## PBI doesn't return the correct sum of values

Hello I have two identical mesures (that I put as variables) that are calculated as follows :

``````CALCULATE (
SUM ( 'Table1'[Value1] ) + SUM ( 'Table1'[Value2] ),
FILTER (
ALL ( 'Date' ),
YEAR ( MAX ( 'Table3'[Date_1] ) )
= SELECTEDVALUE ( 'Date'[Year] )``````

``````CALCULATE (
SUM ( 'Table2'[Value1] ) + SUM ( 'Table2'[Value2] ),
FILTER (
ALL ( 'Date' ),
YEAR ( MAX ( 'Table3'[Date_2] ) )
= SELECTEDVALUE ( 'Date'[Year] )``````

I need a mesure that returns the value of the table that has the most recent date :

``````    IF (
MAX ( table3[Date_1] )
> MAX ( 'Table3'[Date_2] ),
Mesure1,
Mesure2
)``````

The formula works correctly in a table graph lign by lign. However, in the total it doesn't sum the values but recalculates the appropriate value taking into consideration the max date values in the totals. So I need a similar mesure that ignores the total context and sums the values instead

3 REPLIES 3
Community Support

Please take a look at the Greg’s blog about handle measure total level calculation issue if it helps with your scenario:

Measure Totals, The Final Word
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Super User

Have you tried using ALL in your measure to ignore applied filters?

https://learn.microsoft.com/en-us/dax/all-function-dax

Frequent Visitor

It's about the filters but about the two dates we compare in order to determine which value we take.

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors