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 nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
The below calculation is returning all "Retained" values, is there something obvious you can see that's making that happen? The second IF statement should be like an ELSEIF, but PBI doesn't like that.
Solved! Go to Solution.
Hi @PBrainNWH
To expand on @aduguid 's measure, for debugging it might be easier like the following. If you aren't getting the correct result, you can always RETURN either of the variables for debugging.
FY25 Status 1 =
VAR _2024 = SUM( 'Donations by Customer by FY'[2024 Donation Dollars] )
VAR _2025 = SUM( 'Donations by Customer by FY'[2025 Donation Dollars] )
VAR _Logic =
IF(
_2024 <> 0
&& _2025 <> 0,
"Retained",
IF(
_2024 = 0
&& _2025 <> 0,
"New425",
IF(
_2024 <> 0
&& _2025 = 0,
"Lapsed",
BLANK()
)
)
)
RETURN
_Logic
I hope this helps.
Hi @PBrainNWH
To expand on @aduguid 's measure, for debugging it might be easier like the following. If you aren't getting the correct result, you can always RETURN either of the variables for debugging.
FY25 Status 1 =
VAR _2024 = SUM( 'Donations by Customer by FY'[2024 Donation Dollars] )
VAR _2025 = SUM( 'Donations by Customer by FY'[2025 Donation Dollars] )
VAR _Logic =
IF(
_2024 <> 0
&& _2025 <> 0,
"Retained",
IF(
_2024 = 0
&& _2025 <> 0,
"New425",
IF(
_2024 <> 0
&& _2025 = 0,
"Lapsed",
BLANK()
)
)
)
RETURN
_Logic
I hope this helps.
Try this measure
FY25 Status =
IF (
SUM('Donations by Customer by FY'[2024 Donation Dollars]) <> 0
&& SUM('Donations by Customer by FY'[2025 Donation Dollars]) <> 0,
"Retained",
IF (
SUM('Donations by Customer by FY'[2024 Donation Dollars]) = 0
&& SUM('Donations by Customer by FY'[2025 Donation Dollars]) <> 0,
"New425",
IF (
SUM('Donations by Customer by FY'[2024 Donation Dollars]) <> 0
&& SUM('Donations by Customer by FY'[2025 Donation Dollars]) = 0,
"Lapsed",
BLANK() -- This will handle any unexpected cases
)
)
)
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 28 | |
| 23 | |
| 18 | |
| 18 | |
| 15 |
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 43 | |
| 38 | |
| 32 |