Bar chart with benchmark and specific score
Question

Hi All,

I have a question about creating a bar chart (from the charts dependency) in which I want to show multiple bars. The bars will be part of a subject. 

I have a data set that contains questions (multiple choice) and scores for the answers. For instance:
Q1: Example question
A: 1 point
B: 2 points
C: 3 points

Once all questions for a topic have been answered I create an AVG for this specific company and the answered questions, So company A can score an average of 8 points, company B 7 points and company C 12 points. Next to this I also want to show the benchmark of the industry (the average score of all companies, in this case 8+7+12 / 3 = 9). 

Does anyone know how to get this benchmark data next to the company specific data for each subject of questions?


I already checked out this post since it is exactly what I want, just not sure how to do this with my data. 

https://success.outsystems.com/Documentation/11/Reference/OutSystems_APIs/Charts_API/Create_Column_and_Bar_Charts 


I tried creating a SQL statement to combine both AVG scores, but this is not working (yet).


Thanks!

mvp_badge
MVP

Hi Max,

Let me know if this is what you are looking for? sample app - BarChart

Will share the .oml file


Kind Regards,

Benjith Sam

Benjith Sam wrote:

Hi Max,

Let me know if this is what you are looking for? sample app - BarChart

Will share the .oml file


Kind Regards,

Benjith Sam

Hi Benjith, 

It is close! What I am looking for is more like this: 

 



This is what I need btw. I got a bit exited there haha. Other companies should not show since the data is company specific. Only the benchmark (average) should so they can compare

mvp_badge
MVP

Hi Max,

Could you please let me know, where exactly you are facing trouble in implementing the mentioned use-case. So that we could be able to help you better :)

Updated sample app - BarChart 


Kind Regards,

Benjith Sam

Benjith Sam wrote:

Hi Max,

Could you please let me know, where exactly you are facing trouble in implementing the mentioned use-case. So that we could be able to help you better :)

Updated sample app - BarChart 


Kind Regards,

Benjith Sam

 Hi Benjith,

I am having trouble combining the data. I have an Answer table and an AnswerChoice Table which hold the answers to the questions. In the AnswerChoice there is reference to QuestionChoice which holds the QuestionId , the option text and the score (used for the avg). I can combine this into 1 aggregate in my preparation but getting the AVG as a benchmark in combination with the specific score per company (or subject) is not working... I tried adding it inside the aggregate through a SQL query which should get the AVG of all companies but once I add it to the aggregate it doesn't work...

 

By the way, the score per company per subject is already an average score. So for company A the 8 points can be calculated by getting the answers to 10 questions or so. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.