Skip to main content
cancel
Showing results for 
Search instead 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.

Reply
Anonymous
Not applicable

Calculate with filter doesn't return expected value

Hi all,

 

I have a simplified example of what happen in practice.

There is a fact table in which history is kept. These can be identified with the RunID's.

 

I want to sum all the values from the lastest RunID (=2). This should be 100+200=300

 

2019-02-20_21-10-04.png

 

In order to determine the latest RunID, I've created the following measure. I've created a card to verify and it states 2, as expected.

 

2019-02-20_21-11-08.png

 

When I create my measure to sum all values from RunID 2 and reference to the previous measure, it just sums all values with a total of 330. If I 'hardcode' the lates RunID, it does return the sum of the values of only Run 2.

How come these measures don't return the same results?

 

2019-02-20_21-11-21.png2019-02-20_21-11-39.png

1 ACCEPTED SOLUTION
ElenaN
Resolver V
Resolver V

Hello,

 

To solve your issue you can change your formula for LatestRun to:

 

LatestRun = CALCULATE(MAX(Table1[RunID]),ALL(Table1))

Regards,

ElenaN

View solution in original post

2 REPLIES 2
ElenaN
Resolver V
Resolver V

Hello,

 

To solve your issue you can change your formula for LatestRun to:

 

LatestRun = CALCULATE(MAX(Table1[RunID]),ALL(Table1))

Regards,

ElenaN

Anonymous
Not applicable

 This seems to work!

 

However, what is the reason the initial LatesRunId measure didn't return the required outcome?

 

Thank you very much!

Helpful resources

Announcements
Microsoft Fabric Learn Together

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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