Forum Discussion
Making a Simple Yield Curve Line Chart in Power BI
I'm trying to create a simple yield curve line chart in Power BI using bond rates that I have compiled in a table as seen in the screenshot 1. The X-axis needs to be the name of the bond and the Y-axis needs to be the ACTUAL VALUE of the bond rate as it is entered exactly in the "close column" from the table in screenshot 2, NOT A SUM, COUNT, etc. I have searched for 2 days to find a solution that works and I have yet to understand how to solve for this. The data in the table I have now is only for the United States, but I need to be able to find a solution to use for over 30 countries I have data for.
Is there something I'm missing?
Any help would be amazing. Thanks.
Screenshot 1Screenshot 2
- Anonymous6 years ago
AllisonKennedyThanks for replying so soon, I appreciate it.
The "close" values are the price for each gov't bond at the end of each day, so every date will have a "close value" for each individual bond. I just want to be able to see the yield curve line for each single day, or the latest day, which I'm guessing means I need to add the date column to the x-axis (as you mentioned).
I just tried to add additional information as you said and it works as I need it to. The lack of additional data (date, symbol, etc.) was the problem. After adding "date" to the x-axis and filtering data for the latest single day, it works perfectly. Thank you very much for helping me solve this. Seems so simple in hindsight.
2 Replies
- AllisonKennedy
Community Champion
Charts are ALWAYS aggregations of your data. The only way to get around aggregating this would be to use a table and 'don't summarize' option or to add more levels to the Axis field (such as date, time, etc).
In your screenshot 1, you have LOTS of Close values for each Ordinal Name, if you can better describe which value you want graphed in the line chart, we can help you translate that into DAX or Power BI, but you must have some sort of formula or aggregation or filter to determine which value to choose for the line graph.
Hope that makes sense?- AnonymousNot applicable
AllisonKennedyThanks for replying so soon, I appreciate it.
The "close" values are the price for each gov't bond at the end of each day, so every date will have a "close value" for each individual bond. I just want to be able to see the yield curve line for each single day, or the latest day, which I'm guessing means I need to add the date column to the x-axis (as you mentioned).
I just tried to add additional information as you said and it works as I need it to. The lack of additional data (date, symbol, etc.) was the problem. After adding "date" to the x-axis and filtering data for the latest single day, it works perfectly. Thank you very much for helping me solve this. Seems so simple in hindsight.