Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
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?
| Plan | Actual | Corrected | |
| 1 | 1 | 1 | |
| 1 | 1 | 1 | |
| 1 | 2 | 1 | |
| 1 | |||
| 1 | 5 | 1 | |
| 1 | 1 | 1 | |
| 1 | 1 | 1 | |
| 1 | 3 | 1 | |
| 1 | |||
| 1 | |||
| 1 | |||
| 1 | |||
| 1 | |||
| 1 | |||
| Total | 14 | 14 | 7 |
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
Can you create calculated column in this table with the IF syntax you posted? and then apply the calculated measure?
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? ![]()
Measure = sumx(Table1, IF(Actual>1;1;Actual))
Or
Measure = sumx(Table1,[Corrected])
Regards
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 20 | |
| 19 | |
| 11 |
| User | Count |
|---|---|
| 65 | |
| 54 | |
| 46 | |
| 44 | |
| 31 |