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

Calculated Column aka Sumifs

Hello,

 

Below is the sample data I have. What I want to achieve is to create a calculated column that will give me the "Expected Value". However, what I am getting you can see in the column "Current Result".

 

My formula is:

CALCULATE(SUM(Diagonal[Value]),
Diagonal[Executable In]="M+1")
 
I have also tried:
CALCULATE(SUM(Diagonal[Value]),
filter(all(Diagonal),
Diagonal[Executable In]="M+1")) 
 
But none of the above give me the expected result.

 

CountryPeriodExecutable InValueExpected ValueCurrent Result
WonderlandJanuaryM+1500800500
WonderlandJanuaryM+1300800300

 

Can someone help here? 

 

thank you

Marek

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

Could you tell me whether Jihwan Kim's  solution  is useful if you are creating a Calculated column not a Measure?

I made a demo for reference. If it does not meet your requirements, please provide more information for testing.

98.png

Best Regards,
Community Support Team _ Eason

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

Could you tell me whether Jihwan Kim's  solution  is useful if you are creating a Calculated column not a Measure?

I made a demo for reference. If it does not meet your requirements, please provide more information for testing.

98.png

Best Regards,
Community Support Team _ Eason

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

I think your second trial is giving the result that you want.

 

you can also try the below.

 

 

CALCULATE(SUM(Diagonal[Value]),
filter(Diagonal,
Diagonal[Executable In]="M+1"))
 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: https://www.linkedin.com/in/jihwankim1975/

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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.