Oracle APEX 5 charts not working as expected - oracle

I've created a chart in Oracle APEX 5 with 3 different data series:
Series 1: Line
Series 2: Bar
Series 3: Line
I've enabled multiple y-axis with different scales.
When I create Series 1, it uses primary y-axis automatically (as expected).
When I add Series 2, it uses extra y-axis automatically (as expected).
When I add Series 3, all three series start using the primary y-axis (unexpected).
I want Series 1 and 3 to use the primary y-axis and Series 2 to use the extra y-axis. I had created similar chart before and it worked fine. This time I'm unable to get Series 2 to use the secondary y-axis, please help!
Thanks!

Based on Hilary's sample application, the 2nd series should be the one used for the extra y-axis.
https://apex.oracle.com/pls/apex/f?p=36648:7
You may get a response from the APEX dev team if you ask in the OTN forums, especially if you provide a sample on apex.oracle.com

Related

Spotfire Calculation using previous rows calculated data

I have been struggling with the following calculation. I have tried a few previous, next and overs but I cant seem to get the syntax correct.
Basically i need to subtract demand from stock on hand, to get a new column. the the next row will use the newly created column as stock on hand and the subtract the demand for that row, then that result becomes the new stock on hand etc. i cant get it to loop. I have ranked the demand in order of date required per plant. AS the data set will have multiple Plants, SOH and demand.
The attached pic shows A020 only has one QTY short so that is straight forward, but for A030 opening SOH is 152, and the 1st date QTY short is 12, so i need 152-12 = 140. then the second date QTY which is ranked 2, needs to be 140 - 12 = 128, so then rank 3 uses 128 - 12 and so on. ie the SOH needs to dynamically update.
data set
It might not be natively possible in point-and-click Spotfire (happy to be corrected if this is incorrect).
You should consider writing a data function using R to do this groupby-loop operation.

how to create graphics in Quicksight without aggregations

I'm new to Quicksight, I want to make a simple graph with "time" on the X axis and "Pm" (int) on the Y axis.
I take "time" and drag it to the X axis, then I drag "Pm" to Value, but here Pm (Sum) appears with "Aggregate" and I only need the value of Pm. which is recorded every 5 minutes.
How can I do this to solve this?
Or where can I find an example or tutorial?
It is an IoT application, the devices send sensor data to aws IoT Core => IoT Analytics => Quicksight.
Do you want to render the data as a line chart, scatter plot or something else?
It is worth noting that QuickSight doesn't know how your data is recorded and it needs to know what to do if there are 2, 3 or even more rows with the same "time" value. If you know that you should not have more than a single row with the same time, then the fact that QuickSight is doing any aggregation should not matter.
In situations where you might have more than 1 row with a single value, you might want to use Average, Max or Min to aggregate the values (this really depends on the data you are using in the chart and what information is important for you).
To be able to render every single record in QuickSight, you need to add a field that is unique (such as a record id).

Not able to render line chart using d3.js for various date range

I am preparing line chart using d3.js. Wherein I have to create chart for different types of date range on x axis. For example,
For 1 month data
01-01-2018 to 31-01-2018 . This is working fine.
But when I truncate data from database and only prints for months. Like,
FEB-2018 & MAR-2018 ... It is showing repeated values on x axis ... Instead it should show only 1 value for whole month ..
For better understanding, I have prepared the same problem on github.
Please check the link below .
Problem Reproduced with code

SSRS Matrix Variance Column - Report Running Slowly

I am creating an SSRS Report based on a Stored Procedure; the procedure calls in the last six months of data based on the month the user enters into a parameter (ex. 201604). Currently I have this data going into a matrix, and along with those six months the report needs to have a variance column for the latest vs. directly prior month (ex. 201604 vs. 201603)
Right now I have a formula that works using a column that I created within the stored procedure to designate whether the month a row is in is CURRENT, PRIOR, or NONE if it is not being used in the calculation.
=SUM(IIF(Fields!VarHelper.Value = "CURRENT",1,0) * Fields!stock_value.Value
-
IIF(Fields!VarHelper.Value = "PRIOR",1,0) * Fields!stock_value.Value)
I am using this formula in three areas/cells on the report, and for some reason it is causing the report to run very slowly (around 45 seconds to run). Without these variance formulas in the report it runs almost instantaneously.
Would someone be able to either a).suggest a better method of calculating the variance between the latest two months in a matrix, or b).be able to at least shed some light on why this may be impacting report performance?
Thank you in advance!
Try to report the calculations on the query.
Two ways possible : if you made a sql query : make it in the select.
Or, add calculted field in the dataset.
And make sum on these fields.
May be you will win time : because the database server will make the job instead of the report server.

How can I get the values in the Matrix on my SSRS report to repeat?

I know there must be a simple answer to this, but I can't find it.
I have added a couple of textboxes to a Matrix in a BIDS/SSRS report. I've given these textboxes values such as:
=Fields!WEEK1USAGE.Value
It works (after a fashion); when I run the report (either on the Preview tab, or on the Report Server site) I see the first corresponding data value on the report - but only one.
I would think that once a value has been assigned via expressions such as "=Fields!WEEK1USAGE.Value", each value would display (rows would automatically be added).
There must be some property on the Matrix or the textbox that specified this, but I can't see what it might be.
Here is how my report looks (very minimalistic, so far) in the Layout pane:
...and after running, on the Preview tab:
Obviously, I want the report to display as many rows as necessary, not just one. The textboxes do have a "RepeatWith" property, but there description doesn't sound interesting/useful/promising.
I don't see any property on the Matrix control that looks right, either.
I thought maybe the designer was only showing one row of values, and ran the report on the server, too, but there also it just shows the two values.
So what do I need to do to get all the data for a provided field?
Matrices are for display of grouped data and summary information, usually in a horizontally expanding pivot table type of format. Is a matrix really what you are after? Looking at your expression you have =Fields!Week1Usage.Value but in a matrix what I expect to see would be at least =Sum(Fields!Week1Usage.Value) or even better just =Sum(Fields!Usage.Value). Then you would have ProactDescription as your row group and the week as your column group and it would all just work out everything for you, grouping and summing by Proact vertically and expanding the weeks out horizontally.
What seems to be happening is that you have no grouping on rows or columns and no aggregation so it is falling back to the default display which is effectively the First function - it displays the first row of data and as far as the matrix is concerned it has done its job because there is no grouping.
Without knowing your problem or data, I'll make up a scenario that might be what you are doing and discuss how the matrix does the heavy lifting to solve that problem. Let's say you have usage data for multiple Proacts. Each time one is used you record the usage amount and the date and time it is used. It could be used multiple times per day but certainly multiple times in a week. So you might be able to get the times each Proact is used from a table like so:
SELECT ProactDescription, TimeUsed, Usage
FROM ProactUsage
ORDER BY ProactDescription, TimeUsed
In your report you want to show the total weekly usage for each Proact over multiple weeks. Something like this:
Proact Week1 Week2 Week3 ...
Description Usage Usage Usage ...
--------------------------------------------
Anise, Fennel 1 CT 20.00 22.50 16.35 ...
St John's Wort 15.20 33.90 28.25 ...
...
and so on. Using a dataset based on the SQL above we create a matrix and in the row group properties we group on =Fields!ProactDescription.Value and in the column group properties we group on a week expression like =DateDiff(DateInterval.Week, Fields!TimeUsed.Value, Today) and then in the intersection of the row and column we put =Sum(Fields!Usage.Value). To display the header of the column nicely put an expression like
="Week " & DateDiff(DateInterval.Week, Fields!TimeUsed.Value, Today)
The matrix automatically does all the summing by week and product and expands the weeks horizontally for as many as you are reporting. For bonus points you can also put totaling at the end of the columns and the rows to show the total use of that Proact for the period (row total) and total use of all Proacts in that week (column total).

Resources