Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I'm experiencing an issue with the YIELD function in Power BI. I'm trying to calculate the yield, but it seems that IFERROR is not catching errors on a row-by-row basis and assigning values when an error is detected.
Here are snapshots of my Excel and Power BI setup:
Excel Snapshot:
Power BI Snapshot:
The formula I'm using in Power BI is:
YIELD = YIELD(test[SETTLEMENT_DATE], test[MATURITY], test[COUPON], test[LAST_PRICE], test[PAR], test[Freq])
All columns seem to have the correct data types, but I still encounter #ERROR values. In Excel, I get #NUM! and some valid yield values as expected. However, in Power BI, I was expecting it to show results row-by-row and leave blank if there's an error, instead of showing an error for the whole column.
I tried wrapping the YIELD function with IFERROR, but it doesn't seem to handle the errors as expected. Is there any way to make Power BI show the result row-by-row and leave the cell blank if it encounters an error?
Attached the data here for reference
SETTLEMENT_DATE | MATURITY | COUPON | LAST_PRICE | PAR | Freq |
07/30/2024 | 07/31/2024 | 11.00% | 9 | 100 | 4 |
07/30/2024 | 08/31/2024 | 9.40% | 94 | 100 | 4 |
07/30/2024 | 08/31/2024 | 9.40% | 95 | 100 | 4 |
Thank you!
Solved! Go to Solution.
@ElenaStone the formula does not recognizes that Settlement_Date is previous than Maturity, infact, with this code, the column returns the correct output:
We'll retain the dynamic nature of SETTLEMENT_DATE but handle its day value to avoid errors:
BBF
@ElenaStone the formula does not recognizes that Settlement_Date is previous than Maturity, infact, with this code, the column returns the correct output:
We'll retain the dynamic nature of SETTLEMENT_DATE but handle its day value to avoid errors:
BBF
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
16 | |
8 | |
7 | |
7 | |
6 |
User | Count |
---|---|
23 | |
11 | |
10 | |
10 | |
8 |