I have one data set for campaigns from our marketing folks
CampaignID (PK)
CampaignName
CampaignDate
RecipientCount
I have another analytics data set from GA4
CampaignID (PK)
Opens
Clicks
Revenue
I want a report that has
CampaignID (PK)
CampaignName
CampaignDate
RecipientCount
Opens
Clicks
Revenue
I can join on the CampaignID and get Opens, Clicks and Revenue, but there doesn't seem to be a way to get other fields from the left table (CampaignName, CampaignDate, RecipientCount).
I was hoping I could add them as Metrics with aggregate Max(), but the only choice I have for non-numeric fields is Count and CountDistinct
If I add them as dimensions in the left table, need a matching dimension in the right table, so I made dummy fields with value NULL in the right table, but then the join fails. Seems the dimensions become join conditions.
Is there a way to get other non aggregate/join fields in the blended data set
Thanks
Mark
A metric field can be aggregated including min and max.
For a date timestamp in a metric, following options are possible:
Related
I am researching how to create a ecommerce database. After some searches, this is what I found:
The problem here is the OrderDetails is reference back to the Products table. If I edited the Product like price, sku etc, it will affected the previously added order.
I can insert the Product data (serialized, or jsonized) in a new column in OrderDetails column when the order 1st created. But the con is it will hard to query, if I want to query specific data from the product data.
My question is how to design the OrderDetails product stick to data when the order is created, so in the future if I edited the product, it will not lost that data.
The problem here is the OrderDetails is reference back to the Products table. If I edited the Product like price, sku etc, it will affected the previously added order.
Suggest you read the schema before making plainly false statements like that.
OrderDetails referring to Products is not a "problem", it's what I would expect: a Customer mustn't order a Product that doesn't exist.
And to answer my q about what's in the etc from your first version: OrderDetail includes price. That's a common structure: OrderDetail's price is taken from Product at the time of the Customer placing an Order. It's the price quoted to the Customer; so we are legally bound to charge the Customer that price. If the price subsequently changes on Product, that doesn't affect this Order.
Similarly: IDSKU, Size, Colour appear on OrderDetails, so if you "edited the Product", it won't affect "previously added order".
There's nothing "hard to query" here. If you want Product data (perhaps to place a new Order), query Product. If you want historical actual-Order data, query OrderDetails. If you want to look for discrepancies, OrderDetails INNER JOIN Product ON OrderDetails.ProductID = Product.ProductID. Now you have to be careful to dot-prefix Size, Colour for the table you want. But note that UnitPrice is distinct from Price.
My question is how to design the OrderDetails product stick to data when the order is created, so in the future if I edited the product, it will not lost that data.
You should now be able to answer your own question.
I have a master list of SKUs in one table set as a column with a different SKU listed in each row.
I have another table with a daily snapshot of items which I have in stock between 7/1/17 and 7/31/17 in each row. The table shows the item SKU in one column, the warehouse where there is quantity in another column, and the quantity available within that warehouse in another column. There can be multiple occurrences of a SKU on one date if there are quantity in multiple warehouses. The table only lists SKUs on occurrences where there is quantity within a warehouse. If a SKU has no quantity within any of the warehouses on a date, it will not be listed in the table corresponding with that date.
In my table with the master list of SKUs I want to create a column that will show the the number of days within a range of dates (7/1/17 to 7/8/17) in which there were no quantity of the SKU being referenced available in any warehouse.
To show a more precise idea of what it is I am trying to do, I have posted a youtube video here: http://youtu.be/6CWLN6wzaWQ?hd=1
Have a look at the following URLs - I feel partially similar cases are discussed and resolved over there.
It will surely give you some lead to further work on.
How to return multiple values between two dates in excel?
https://answers.microsoft.com/en-us/office/forum/office_2007-excel/finding-missing-dates-in-column/8c49800a-6997-4585-b1f4-abdeaa64e718
I have the following 3 tables:
Retailers - ID, Name
Registration - ID, Status (YES/NO)
Refund - ID (populated into a dropdown list from Retailers table), Name (Empty), Status (Empty)
Retailers is a table full of data, while Refund starts off as an empty table that gets filled in as a Refund Form is filled up. After creating a form based on the Refund table, how do I allow a user to select an ID from the dropdown list and populate the corresponding Name into the Name field and Status into the Status field?
What are the queries needed and how do I integrate this into the form?
I have tried the method found here - https://www.linkedin.com/pulse/autofill-form-microsoft-access-tim-miles
However, I have run into 2 problems:
1) The form does not appear in "Form View"; it is only viewable in layout view. I have read many links saying that the queries are read-only or that there are no records in the first place etc. The answers don't make sense.
2) If I bind the form (instead of a table) to a query this way, how do I save this new data into another table? My intention was to have the record saved in Refund table.
Sounds like Refund is your base table here. So, the query you want is:
SELECT a.[ID], b.[Name], c.[Status]
FROM Refund as a
Left Join Retailers as b
ON a.[ID] = b.[ID}
Left Join Registration as c
ON a.[ID] = c.[ID]
You'll need to make all 3 ID fields the Primary Keys in their respective tables. This should make the query updateable, and then you can use this query as the DatSource for your form.
You also have to make sure you set up the Relationships for all the tables. If you've never done it, it's easy to do and Microsoft gives you instructions here:
https://support.office.com/en-us/article/Create-a-relationship-40c998dd-4875-4da4-98c8-8ac8f109b85b
By setting up referential integrity in the relationships, you can save the data.
How does one handle situation when you have sales orders and items tables, and then at one point in time you have to change an item. The change will also show up on sales order that have that item. However, lets say that at the time the sales order was place the information was correct but changed later. I don't want older SOs to change what they show for line items and I don't want to have to make new items because it will confuse me later which item is correct.
I noticed that in OpenERP it does just that, keeps the name of part number and description on sales order even if you changed it after sales order was made.
If you are creating new database restructure your Item table. Create a table (for e.g. ItemHistory). have a ItemID and ItemTypeID and DateCreated Fields on it.
ItemID should be used for orders and ItemTypeID + DateCreated will help you to get the current Item.
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.