I am using Oracle APEX 4.1.1 to build a sales tracker. To explain things as simple as possible we have a table CALLED "CARS" of all products and their cost with the columns as "CAR" and "COST" there are about 500 cars listed and their associated costs.
We have a form setup so the sales staff can record their sales week by week. Simple form with a list of values built upon the "cars" column called "P2_CARS and I want the cost field in the form "P2_COST" to be generated from a query that runs against the table.
It will run dynamically when they change the value in P2_CARS and I have this but pretty sure its all around the wrong way or just wrong.
SELECT COST FROM CARS WHERE CARS=P2_CARS
can anyone help?
Related
I have a list of opportunity product lines associated to opportunities that I want to pass to a field within the opportunity table so users can see this within the opportunity table view. The products in the opportunity lines are Number of learners. For projecting onboarding numbers for the month I want to add one field to my opportunity entity.
Total number of learners
This field would be populated by the total quantity of all "learners" products in the opportunity product lines.
I have tried a roll up field, but I can't seem to get it to sum up the quantity of products to appear within the new field created in the opportunity entity.
What features of Dynamics CRM could help me achieve this? MS workflow?
Rollup
Product Line
Rollup field on Form
rollup field should solve your req.
If that does not solve your problem, Then you can create Power autome/ cloud flow.
If not you can create Plugin
If not Javascript.
But my best bet or choice would be rollup and then cloud flow.
I have 2 tables on a PBI Dashboard, one that shows Date, Airline Code, Flight Number and Passengers per Flight, and then a table that shows information such as passenger name, date, reservation ID etc.
The first table is filtered to only show flights that have 5 or more people on a flight. Which works fine. I am trying to find a way to filter the second table based on the values that are left in the first table. So the second table should only show the individual traveler records who are on flights with 5+ people. I can't apply a filter with Passenger per Flight, as once I have the traveler information included, it will always be = 1.
Essentially, I want to add a measure into the second table on the right that will NOT take into account the identifiers such as passenger name and reservation ID. It should show the same count for each flight as what's shown on the first table on the left.
I'm sure it's a simple solution, but haven't been able to come to it.
Passenger per Flight = CALCULATE (
DISTINCTCOUNT('Fact Reservation'[TravellerID]),
'Dim TravelType'[Travel Type] = "Air"
)
You simply need a relationship between the two tables that is configured to flow filters from the flight table to the passenger details table.
I have the table of customers with different statuses in different months
.
I have added Status value In Power BI Slicer Visual to filter the Matrix Data. And when, selecting for example A, it only shows customers who has A status in certain period.
Filtered Customer Data
.
(6 an 8 are missing because they don't have status A in any period). The Problem is that I want to see all the statuses of the customers who even once had status A. is it possible somehow in Power BI ?
Result I want to See
Good news: there is a pretty easy fix for this.
Create a new table using DAX.
FilterableStatuses =
SUMMARIZE(
DemoData,
DemoData[CustomerID],
DemoData[Status]
)
Create a relationship in your model between CustomerID on this new table and CustomerID on the table from your visual. It will be Many to Many and I prefer to not leave the filter direction as 'both' -- make it so FilterableStatus filters your original table.
Create a slicer using the status from FilterableStatuses rather than the original table, and that should give you the behavior that you're after. In essence, rather than filter the visual by [Status], you are filtering the list of CustomerIDs by status, and then letting the new relationship filter your visual to CustomerIDs
Hope it helps!
CONTEXT:
I want to monitor payment transactions for money laundering, where payments cross multiple borders. There are a max of 6 countries shown per transaction. For each of these countries, I need to know a risk level.
I have 2 tables:
Transaction data (where there are many transactions from same country)
Country Risk (containing each country once, with an added risk classification. There are 100+ countries, and only 6 different Risk levels).
Problem:
I would like to look up the Risk Classification per country in Transaction Data. The problem is, there are 6 countries per transaction in Transaction Data. So I have to link Transaction data to Country Risk 6 times. Only 1 relationship can be active, of course.
So I tried writing the following measure:
CALCULATE(
VALUES('Country Risk'[Risk classification]);
USERELATIONSHIP('Transaction Data'[Country 2];'Country Risk'[Country Code]))
I get an error though when using the measure in a graph where I listed the countries from Transaction Data (where every country is mentioned in multiple rows) and I wanted to see the related risk categories:
A table of multiple values was supplied where a single value was expected
What am I doing wrong?
Made similar test data: https://drive.google.com/file/d/1_kJW-BpbrwCsbSpxdo7AJ3IzPy2oLWFJ/view?usp=sharing
Needed:
for every C (C1-C6) column I need to add the risk category.
For every C column I need to make a pie chart showing the number of transactions per risk category for that C column
Pie charts should filter the transaction oevrview: (
I've taked a PBI consultant about this, there is no way to get this issue solved the way I want it to (to have multiple relationships between 2 tables all acting as if they were active relationships at same time).
the only way of getting it done would be:
1. write measures (but that doesn't allow cross filtering between pie chart and table below)
2. unpivot the country columns (but that wouldn't allow to have 6 columns with risk category in table)
3. have 6 dimension tables (this solves the issue, because it allows both cross filtering between piechart and other piecharts & table. and it would allow to have 6 columns for separate risks in the table visual)
thanks for trying to help guys!
I have an Oracle ADF entity in which there are relationships between the rows which are enforced in the database.
I'll give you a simplified case:
Suppose the attributes of MyEntityImpl are Customer, Month, and Quantity, and Quantity Rank. Suppose the primary key is (Customer, Month). Suppose the definition of "Quantity Rank" is that it must be the dense rank of the customer's quantity within the given month. So, the customer with the highest quantity in the month gets 1, then next highest gets 2, etc. (Suppose ties are broken by customer name -- it doesn't matter).
The DML for this page is set up such that, when I update any row, the "quantity rank" values of all customers in the given month are immediately recomputed and updated in the database.
So, the key question here is: what is the most natural, simplest, most "ADFish" way to make my ADF page efficiently requery and display the updated rows for the entire month whenever any value in the month changes?
For example, the user updates customer #100, month 2017-02 with a quantity of 100. That will cause some (or even all) of the other customer records in month 2017-02 to get updated "quantity rank" values. What is the best way to ensure that my ADF page refreshes those other records as well as the record that was actually updated?
Update
In the actual problem the "quantity rank" calculation is very involved and requires a lot of other database data, which is why it is done in the database. So, solutions involving Groovy expressions and what-not are probably not going to be helpful. I tried including the data required for this calculation in the entity model, so that I could have the ADF page perform the calculation, but the extra data slowed down the page noticeably. Performance is very important on this page (even more-so than usual).
If I understand your question, you want the ADF BC model updated when the data source changes. You might start by looking at active data sources Docs, here. and this blog.
If you mean the ADF Faces page issues a change to the database through the ADF Model and ADF BC layers, you can re-execute the query from the ADF FACES page, using EL to call the Execute operation on the data control, or refresh the iterator here.