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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
idontexist
Helper I
Helper I

Use Excel function IF

Hello guys,

 

I would like to use same function IF like in Excel. 

 

Table - is already calculated field and it's live source. I have 2 columns: Plan, Actual. I want to create measure that will shows me values like this: IF(Actual>1;1;Actual). But in power bi will give me value 1 everywhere, even in Total, because totals here is calculated field too, that used same formula, instead of sum by column. How can i solve it?

 

 PlanActualCorrected
 111
 111
 121
 1  
 151
 111
 111
 131
 1  
 1  
 1  
 1  
 1  
 1  
Total14147

 

6 REPLIES 6
Stachu
Community Champion
Community Champion

if Corrected is already a calculated column, wouldn't simple SUM measure do OK?

CorrectedValue = SUM('Table'[Corrected])
Please note it's a new Measure not a new column



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Hi, @Stachu

 

This column does not exist. Maybe i need something like ADDCOLUMNS. I'm not sure 😞

Can you create calculated column in this table with the IF syntax you posted? and then apply the calculated measure?



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Hi @Stachu

 

No i can't as it's live data. The easiest way is to ask admin to add new column with my function.

Hi @idontexist,

 

In addition, could you try using SUMX function to create a new measure to see if it works in your scenario? Smiley Happy

Measure = sumx(Table1, IF(Actual>1;1;Actual))

Or

Measure = sumx(Table1,[Corrected])

 

Regards

Hi @v-ljerr-msft

 

Unforunately, it's not working 😞

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.