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
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
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.