Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello,
I need help with formula because I can't figure out why that simple formula doesn't works.
Example:
I have this table.
I used this formula:
Solved! Go to Solution.
Hello @EdgarasR1
You can create a measure like so to get your result.
Measure =
VAR _Fact = SUM ( 'Planas vs Faktas'[Fact] )
VAR _Plan = SUM ( 'Planas vs Faktas'[Plan] )
RETURN IF ( _Fact > _Plan, 0, _Plan - _Fact )
You should create measures for each of the amount though then use those measures.
Fact Amount = SUM ( 'Planas vs Faktas'[Fact] )Plan Amount = SUM ( 'Planas vs Faktas'[Plan] )Plan-Fact = [Plan Amount] - [Fact Amount]
Then the final measure would be just this:
Measure = IF ( [Fact Amount] > [Plan Amount], 0, [Plan-Fact] )
Hello @EdgarasR1
You can create a measure like so to get your result.
Measure =
VAR _Fact = SUM ( 'Planas vs Faktas'[Fact] )
VAR _Plan = SUM ( 'Planas vs Faktas'[Plan] )
RETURN IF ( _Fact > _Plan, 0, _Plan - _Fact )
You should create measures for each of the amount though then use those measures.
Fact Amount = SUM ( 'Planas vs Faktas'[Fact] )Plan Amount = SUM ( 'Planas vs Faktas'[Plan] )Plan-Fact = [Plan Amount] - [Fact Amount]
Then the final measure would be just this:
Measure = IF ( [Fact Amount] > [Plan Amount], 0, [Plan-Fact] )
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 49 | |
| 35 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 91 | |
| 75 | |
| 41 | |
| 26 | |
| 25 |