Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Filter -Help!

Hi! What am I doing wrong?

I am calculating a table cell from the sum of a column in Table 1. I need the sum only if a second column in Table 1 meets my criteria. 

 

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

Hi @Anonymous,

 

To new measure:

 

Oil MMBBLS =
VAR sumall =
    CALCULATE ( SUM ( Table1[Column2] ), ALL ( Table1 ) )
VAR c1 =
    MAX ( Table1[Column1] )
RETURN
    IF ( c1 = "Proved Developed Non- Producing", sumall, BLANK () )

Capture.PNG

 

For more details, please check the pbix as attached. If it doesn't meet your requirement, kindly share your excepted result to me.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

9 REPLIES 9
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

To new measure:

 

Oil MMBBLS =
VAR sumall =
    CALCULATE ( SUM ( Table1[Column2] ), ALL ( Table1 ) )
VAR c1 =
    MAX ( Table1[Column1] )
RETURN
    IF ( c1 = "Proved Developed Non- Producing", sumall, BLANK () )

Capture.PNG

 

For more details, please check the pbix as attached. If it doesn't meet your requirement, kindly share your excepted result to me.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi @Anonymous,

 

Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Ashish_Mathur
Super User
Super User

Hi,

 

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Ashish_Mathur -

I am new to this and it is for a project. Your help means SO MUCH!!!

 

Hi,

 

Try this calculated column formula

 

=IF('1P Reserves'[Column1]="Proved Developed Producing",CALCULATE(SUM('Reserve Run'[OilNet(Mbbl)]),'Reserve Run'[Reserve Category]="Producing"))

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

@Ashish_Mathur 

Thank you!! I am getting the error: "Rename Columns: Model object names must be non-empty". ???

Anonymous
Not applicable

I got it!! How would I do the second row for "non-producing" since I can't create a new column because the new column is already there...? Is it a "new measure"??

Hi,

 

 

Please state all your conditions clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

@Ashish_Mathur Not sure what you mean? 😕

I need to add the second value under the column "Oil MMBBLS" for the "Proved Non-Producing" category.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.