Baseline deviation graph in Oracle APEX5.0 - oracle-apex

In Oracle APEX 5.0 , I want to create a baseline deviation graph where in it should display the graph in below format.
Given X axis is the date column and Y axis is the column with numeric value , I should be able to highlight the least value through a line ( as you can see in above graph the line marked in red is a baseline value ) in addition to the linear display on chart.So far I tried using "D3 Line chart" plugin but seems its not displaying the chart in expected format.
Could you please suggest if its possible to create such a chart? What plugin is required for that?

i think you dont need a plugin
you can achieve this need by using a chart sample with multiple series
and you can give your secondary serie with a fixed baseline value like
SELECT link, label, series_1_value [, series_2_value [, ...]]
FROM ...
SELECT link, label, series_1_value , 2
FROM ...

Related

Charts in Oracle APEX display group as label

As mentioned in the Title im creating a Webapplication with Oracle APEX and my Charts are showing Group (im German so on my charts it shows "Gruppe") instead of the selected Labels.
First few labels are correct but the it'll take Group 6 for example.
Are you seeing x-axis labels like Gruppe x?
The Reason?
When the number of data points for a series is higher than the number of x-axis labels being rendered.
What to do?
Please run the SQL query in SQL Workshop, and identify any duplicate entries for a given x-axis label. Probably, you will need to update the SQL query, to avoid returning duplicate data.

Power BI Combine Value Plus Unichar In a Tabular Report

I have one tabular report to track the performance according to the month... if the difference is in positive values then need to show "GREEN UP ARROW" icon and if the difference is in negative values then need to show it in "RED DOWN ARROW".
Required the above output into one single column not in to multiple column like in the below screenshot
I have tried the UP and Down Arrows in my report but I am unable to get the result in to one column.
You can use conditional formatting to achieve this. Edit Cell Elements on your visual, turn on Icons for the required series, then set the icon options as follows:
This displays as:

Power bi box and whisker: filter with an if statement

MWE set up:
1) From the Power Bi visual website: https://app.powerbi.com/visuals/ there is a custom download "Box and Whisker (Jan Pieter)"
2) Download sample.
3) create new measure with dax formula:
Distinct count score = if(distinctCOUNT(Courses[Score]) > 4, average(Courses[Score]), Blank())
4) Add a Stacked column chart with Course as the axis and the newly created 'Distinct count score' as the Value and get the following:
5) compare this graph to the Box and Whisker provided by Power BI:
Here is my problem. I only want to show values in the Box and Whisker where the Distinct Count of Scores is greater than 4 -- So I only want Physics to show up (like the stacked column chart above).
So if I try the solution working with the stacked bar chart using the Dax formula. I get the following--nothing shows up:
And this is what I want to happen:
Question:
Is there a way in Power BI run and distinct count statement within a Box and Whisker chart to only show data with > 4 distinct values (or any if statement)?
I want it to be formula based, I cannot just 'visual filter' items I do not want.
Possible answer:
I thought about going to the source code to try and 'throw in' a if statement. But I went to the developers git hub: https://github.com/liprec -- I couldn't find the repo for this visual.
Basically this is due to the way the box and whisker chart is working. The visuals needs a dataset to calculate the values (mean, median, etc.) and use those values to show the box and whisker.
So in your case you need to create a measure that is on the same level as the scores (because those values are needed) and is only available. See the screenshot for a visual explanation of the needed measure.
I created the measure with the follow DAX measure:
Filter Score = IF(CALCULATE(DISTINCTCOUNT(Courses[Score]), ALLEXCEPT(Courses, Courses[Course]))>4, MIN(Courses[Score]), BLANK())
The Boolean expression of the IF statement calculates the distinct scores per course via a CALCULATE expression and the ALLEXCEPT filter option to ignore everything but the course value. And the TRUE part returns the score which needs to be aggregated, so the MIN and the FALSE part return a BLANK() value so is can be ignored.
When you add the new measure and create a BW chart it will only show 'Physics' course results.
If you need more help, please let me know here or via email.
-JP
BTW: I just updated my PowerBI visual GitHub repository (https://github.com/liprec/PowerBI-custom-visuals) and added my box and whisker chart and my hierarchy slicer to it in the folder oldAPI.
The crux of your problem, as far as I can tell, is that you want to filter visuals to courses that have a particular number of distinct values. Which visual you want to use is almost irrelevant (though it was helpful to have a sample Power BI workbook to follow along with).
The way I'd approach this (and not saying this is the best or only way)
Step 1
Create a new Course dimension table, with one row for each unique course. In the sample workbook, you can click 'Enter Data' and manually type in the data.
Course
------
English
Math
Physics
Step 2
Next, create a calculated column in the new table and calculate the distinct count for each course. This isn't a measure - it's a column in your table, that uses the Distinct Count calculation from your question.
Distinct Count = CALCULATE(DISTINCTCOUNT(Courses[Score]), SUMMARIZE('Courses','Courses'[Course]))
The SUMMARIZE works like a GROUP BY. In essence, creating one row per course with a distinct count of scores.
Step 3
Use this new attribute as a filter on your visual. You can then dynamically alter the number of distinct values as you feel like (4, 3, 2).
I know this isn't quite as good as typing a formula into the visual filter field, though in practice it's still formula driven. The formula is just on an underlying table.
Why so complex?
The reason you have to do this for the Box & Whiskers visual, whereas your 'Distinct Count score' measure works so well, is that on the column chart, you are displaying a single value (the average score). The Box & Whiskers chart, by contrast, is plotting every individual score.
In fact, if you removed the 'Course' from the axis of your column chart, the value changes as it adds back in the courses you filtered out. (The reason for this is that, if no course is on your axis, your formula calculates the distinct count of all the courses, which is 7). Likewise, if you were to filter your column chart to a particular session, your column chart would go blank (since in any given session, no course has more than 4 distinct values).
The technique I've described above fixes those problems, because it filters out the courses Math & English from the get-go. It doesn't matter if you've filtered to a single session, or not filtered by course at all. English & Math will always be excluded as long as their distinct count is below the value you specify.
Hope this helps.

Bar-Line chart in SAS Enterprise Guide

I'm trying to put together a bar chart and a multiple line plot grouped by a column chart into a single bar-line chat in SAS Enterprise Guide.
If I select a bar-line chart, the only option is to assign columns to -
bar sum of and (bar chart)
line sum of task roles. (line chart)
However, I do not need any aggregations and I only have to print the graph for the data set as is.
Please let me know the best way to generate a bar line chart in SAS Enterprise Guide.
Thanks in advance!
Depending on what your dataset looks like, the sum might well be the answer. If your dataset only has one row per bar or line you're looking for, then asking for the sum will get you the sum of one item - i.e., its value.
For example, let's say you take the built-in dataset sashelp.class. You want a bar-line chart with the heights and weights of the students as the bars and lines, respectively.
You select "Column to chart" -> "Name", then drag Height over to "Bar sum of", and drag Weight over to "Line sum of". Then you get a nice bar/line graph showing heights and weights - technically sums, but sum of one number is itself.
If your dataset doesn't have a variable appropriate for Column to chart (i.e., an identifier variable that would represent a single row in the data), you may need to modify your data to conform to this; otherwise SAS doesn't have a good way to tell what is supposed to be in one bar.

How to overlay a line plot over a bar graph in APEX?

Right now I have a stacked bar graph and a line graph on one page using apex 'create a region' functionality. I'd like to combine these to one chart. I am thinking if you pehaps create a custom xml code in order to do so, but i'm not sure if that's the right direction to go to. Any help in this regard is appreciated.
No need to fiddle with XML. Create a second series in the chart using the SQL of your second chart and set the 'Series type' attribute to 'Line'.
Check "Multiple Y-Axis" in the display settings to plot your second series with a separate set of Y values. This means the number range offered in both series can be different scales. This can rescale as you show/hide specific series, as offered in one of the Legend properties.
Here is a link to a sample application by Hilary from the APEX team, plenty of examples in there regarding what is possible:
https://apex.oracle.com/pls/apex/f?p=36648