How could I only show the min in MS Access? - database

I am very new to access.
I tried to filter the data by using Totals and grouped the productPrice by min, however I get a range of all the product prices from min to max, here is a screenshot.
Also there is another column after MinOfproductPrice called storeName, I didn't include it for privacy reasons.
How could I make it so only the lowest price per product is shown? An example of what I am trying to do.

You could just do a summary query and do a group by with min (as you have done), but I suspect that the column you removed is to blame as it sounds like you want to be able to show that information as well.
There are a few ways to do this. In the first, you'll need to first create a summary query that gets just the product id and minimum price. Then, link this query back to your main table/query to get the additional columns like store, container, etc.
It is similar to finding just the most recent order row for each of your customers. The technique is the same. You can see a demo here:
https://youtu.be/5cnwHyn4dnI

Related

Measure that shows the oldest product in the table - DAX

DAX is still a little bit confusing and new for me and that's why I'm looking for your help.
I have a very simple table that shows the products that are in the production line. It contains 3 columns: One is for the product name, the other one contains the date in which the product went to the production line and the last one, the amound.
All I want is to show in a dashboard in Power BI the first product that still is in the production line. In another words, I want a measure that calculate the oldest date in my table and return the following product (or products ) related to that date.
One solution is to show a table sorted by the date but it is not really what I'm looking for.
Thanks in advance

How to manipulate dataset to get information from different tables?

Currently my data is set up as a union of two tables. The red rows are Table 1 and the blue rows are Table 2. I am doing my union in SQL Server and am connecting this into Tableau. I am using Excel right now to depict what I am seeing (left pivot table) more easily and what I want to see (right made-up pivot table).
The current pivot table is showing when filtered on a particular Plant/Project/Product, those are the components that go into the Product and those are the months in which the Products are due to the customer. The values in the bottom row are the quantity of the Product that is due to the customer. For example- in June, a quantity of 1 of the 150-100020-1000 product is due to the customer. The quantities are showing up under a null component because that field isn’t in Table 2, as you can see in the blue rows.
I want those bottom row values to appear under literally any one of those components that are listed. In this case, it’s only showing one set of Plant/Project/Product, but I would want the formula/code to pick up on that too when it’s evaluating what to output. In the example on the right side made-up pivot table, I have the quantities showing up under the component #100, but it can be under any of them as long as the Plant/Project/Product is equal in both tables. I also don't want the blank/null dates from Table 1 to show up, but they are tied to the components so I can't filter them out easily.
I've tried several types of joins and temporarily tables to get this working and keep coming up blank. How can I set up my dataset to get the view I want to see in Tableau?
Dataset and Current View + View I Want
Your problem is you don't have a Component against a Qty. Hence for what you want somehow you need to create a Component. Perhaps this is possible using a FIXED calc, which would create this field across all records. If the value of Component doesn't matter create this calculation:
{MIN([Component])}
This should put 100 against each record.
If you also need to keep the existing Component value, when it exists, try a formula such as:
IFNULL([Component],{MIN([Component])})
Note I haven't tested any of this.

NetSuite - UNION ALL equivalent in saved search?

I'm in the process of writing a SuiteTalk integration, and I've hit an interesting data transformation issue. In the target system, we have a sort of notes table which has a category column and then the notes column. Data going into that table from NetSuite could be several different fields on a single entity in NetSuite terms, but several records of different categories in our terms.
If you take the example of a Sales Order, you might have two text fields that we need to bring across as notes. For each of those fields I need to create a row, with both the notes field in the same column but separate rows. This would allow me to add a dynamic column that give the category for each of those fields.
So instead of
SO number notes 1 notes 2
SO1234567 some text1 some text2
You’d get
SO Number Category Text
SO1234567 category 1 some text1
SO1234567 category 2 some text2
The two problems I’m really trying to solve here are:
Where can I store the category name? It can’t be the field name in NetSuite. It needs to be configurable per customer as the number of notes fields in each record type might vary across implementations. This is currently my main blocker.
Performance – I could create a saved search for each type of note, and bring one row across each time, but that’s not really an acceptable performance hit if I can do it all in one call.
I use Saved Searches in NetSuite to provide a configurable way of filtering the data to import into the target system.
If I were writing a SQL query, i would use the UNION clause, with the first column being a dynamic column denoting the category and the second column being the actual data field from NetSuite. My ideal would be if I could somehow do a similar thing either as a single saved search, or as one saved search per entity, without having to create any additional fields within NetSuite itself, so that from the SuiteTalk side I can just query the search and pull in the data.
As a temporary kludge, I now have multiple saved searches in NetSuite, one per category, and within the ID of the saved search I expect the category name and an indicator of the record type. I then have a parent search which gives me the searches for that record type - it's very clunky, and ultimately results in far too many round trips for me to be satisfied.
Any idea if something like this is at all possible?? Or if not, is there a way of solving this without hard-coding the category values in the front end? Even if I can bring back multiple recordsets in one call, that would be a performance enhancement.
I've asked the same question on the NetSuite forums but to no avail.
Thanks
At first read it sounds like you are trying to query a set of fields from entities. The fields may be custom fields or built in fields. Can you not just query the entities where your saved search has all the potential category columns and then transform the received data into categories?
Otherwise please provide more specifics in Netsuite terms about what you are trying to do.

Creating a slicer using DAX in PowerView

I am working to make a dashboard in MS PowerView but having some trouble creating "slicers" for my dashboard. A slicer is basically a filter for the whole dashboard which filters out the whole display based on what is selected. For example, I am working with a survey so if we click on person type 1 under the "person" slicer, only responses from person type 1 will show.
I am trying to make a slicer based on statistical measure type. Basically, I want a slicer with 3 different statistical measures: average, median, and mode. So when "average" is selected only those graphs using the measure of "average" will display.
So far, all I have is a table in MS Access called "measure name" and I have made this a slicer on my table. However, in order for my slicer to work I believe I have to use a DAX formula. Any idea how to do this? I have tried
if(MeasureName[MeasureType] = "Average") but I'm not sure what to put for the true and false.
Any feedback would be appreciated!! :)
You can make a slicer that allows users to choose the measure to be shown in charts on the canvas. But as Rory said, you cannot use it to show/hide graphs. It would just change the measure used in the graphs.
Jason Thomas has a good blog post on creating a slicer to choose measures in Power Pivot. It works similarly in a Tabular model.
Create a table of measures with an ID column.
Create a measure based on that table to find the minimum ID value from the slicer selection. This tells you which measure is chosen.
Replace the measures in your charts with this new measure.
I don't consider this to be against Kimball at all. It has less to do with the dimensional model and more to do with the technological solution required for the desired UI capabilities. Basically, you can have your dimensional model and have this table out outside of that without feeling like you are breaking the rules.
A slicer is usually an attribute of one of your dimensions. When you filter on that attribute the filter applies also to your fact table. So if you have a dimension with three entries: average, median and mode it would be possible to create one fact table that stacks the average, median and mode values so that when the slicer is clicked the fact table is filtered for that attribute.
That will allow you to show the three types on one graph. It won't allow you to show some graphs and not others. And this type of fact table kind of goes against what Kimball might say about fact table design ...

Salesforce Report Builder: Sorting by Grouped Total

I have a pretty basic scenario: contacts have orders and orders have order line items. An order has a forumla field on it to calculate the entire cost of the order and that is working fine. I'm trying to create a report that shows each customer name and the summed dollar amounts of all orders for that customer. So I drag the customer name onto the fields area and then add the order total field. I group by the customer full name and then I set the group by on the order total column to sum and this works fine...but then I can't sort by that column. I want to sort by total dollar amount so I can quickly see who is a high buying customer. Is there a way to order a report by a summed field or will I just have to export to Excel and manipulate the data there?
Thanks
Josh
I'm sure that this is possible. I've recreated your scenario with the standard Opportunity object and the Amount field. I have grouped on both Opportunity Name and Amount. Clicking on the down arrow button on the group gives a menu that allows you to change the sort order of the group as shown in this image.
I think the fields in your report should behave in the same way.

Resources