Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Chart dataset filters
albertov
Hello,
I have a problem with BIRT that I don't know how to solve:
In my report, I plot a line chart with 2 series: actual and budget.
Each serie starts from week 1 and end to week 52.
The problem is that the budget is defined for the whole year but the actual line should stop to current week.
The field I'm using is a recurring sum so I have data in each week... This cause that if today is week 25, the line doesn't stop and create an horizontal line until week 52.
Is there any way to stop that at actual week?
Thanks!!
Find more posts tagged with
Comments
mwilliams
You want to stop just that line? Or the whole chart should stop at the actual week? If the whole chart, you could just add a filter to your dataSet to not allow dates after today's date. Let me know.
albertov
I want to stop only that line. The budget line should continue to the end of the time period.
mwilliams
Gotcha. What is your BIRT version? I'll try to make you an example.
albertov
Would be great! Thanks so much.
My Birt version is 2.6.1 that is embedded in spagobi
mwilliams
Take a look at this post. I added a computed column that gives a null value if the date field month is past the current date month. Since I used a scripted dataSet, the computed column is in the fetch script. I've marked it. Then, I use this computed column as the "actual" field in the chart. I also use a scatter plot with a connecting line, rather than a line chart. The scatter plot allows you to ignore the null values. Let me know if you have questions.
albertov
Thanks so much! That worked perfectly
mwilliams
You're welcome. Always glad to help. Let us know whenever you have questions.