NetSuite Saved Search Showing Inside Sales Rep If There Is One - netsuite

I'm trying to do a saved search in NetSuite that returns all of the customers in a particular state and, for those which have an Inside Sales Rep, the name of that rep.
But if I specify Sales Team Role = Inside Sales Rep in the criteria, the result only contains customers who have an Inside Sales Rep (and we have some that do not).
If I don't specify the Sales Team Role in the criteria but list Sales Team Role and Sales Team Member in the Results, then I get every customer, but a row for every sales team member, with their role - so multiple lines per customer. I don't want that.
I just want a line in the results for each customer and, if there is an Inside Sales Rep on that customer, that person's name.
Any suggestions?

Basically, you need a left join ;).
Instead, you can use a formula to return either the sales rep if the role is inside sales, or null, or null if there is no sales rep. Then you aggregate it using maximum.
Or you can use the rank function (using the formula above within the rank syntax), selecting where rank = 1. This allows you to save your aggregation for when you need it, at the expense of clarity.

Related

How to list my Sales Reps for a customer on one line?

I have some orders on NetSuite that has 2 or more sales reps getting commission for the sale. I want to create a search (if possible) that would return only one line with all sales reps' names separated by a comma (John Smith, Jane Doe, etc.) instead of returning 2 (or more) separate lines for the same order but different sales rep name under the Sales Rep column.
You can use the undocumented NS_CONCAT() function in your saved search. If you're using sales teams and your sales reps are returned in the Sales Team Member field, you would combine them like this:
Group your search results by Sales Order (and any other field you need in the results).
Add a Formula(text) field to the results, set the summary type to 'Minimum' and set the formula to NS_CONCAT({salesteammember})
This will combine all of your sales reps into a single field separated by a comma.

How to add product and product category in quotation pivot list in below list like sale analysis in odoo 11?

[in sale analysis on total two list product and product category there. same things I want to add in quotation pivot table how can I add?
That is not really possible, because the BI (Business Intelligence) reports (you called it "sale analysis" in your question) are actually transformed data with sales order LINES as base. And the pivot of sales order are based on sales order. You don't have product and product category information, because you have a one to many relation to order lines where this information is belonging to. It's only working the other way around (lines information -> order information).
So the solution is probably extending sale analysis (i think the model is sale.report) with every other thing you're missing there instead of changing the pivot of sales orders.

Prevent duplicates across multiple sublists

Our organization runs a daily transaction list (via saved search) to forecast our opportunity pipeline. For this saved search, we set the customer mainline to false to eliminate duplicate values in our search.
I've built a saved search text formula that references the customer sales team, which I understand is a sublist. This sublist doesn't play nicely with my transaction report and results in duplicate values.
What I want to have happen is for the transaction line item to pull in the name of the sales team member who has a sales team role of "team lead". If there isn't a sales team member with the team lead role, then I want the result to be blank. We do not have any sales teams where there are two team leads, so we will never run up against this.
The problem I'm getting is duplicate values. The report interprets my code to mean if a customer has a sales team member with the team lead role, then duplicate that line item as many times are there are sales team members. As an example, I have a customer with 8 sales team members. My code results in 8 duplicate line items and one line item has the name of the team lead while the rest are blank.
Thoughts on how to resolve? Thank you in advance. My code looks like this:
I cannot change customer main line to false, as this is makes it even more complicated. Leaving customer main line as false displays exactly what I need currently, with exception of the name of the team lead.
CASE
WHEN {customer.salesteamrole} = 'Team Lead'
THEN {customer.salesteammember}
ELSE NULL
END
What I'm looking for is one line item for each transaction and simply the name of the team lead on that transaction. Perhaps the answer is to create a custom field, but I'd like to think the solution can be accomodated in a transaction report.
You can set a filter in the Criteria tab to make sure only the lines that you want are returned. In the Criteria tab under Filter, select the Formula (Numeric) option, and set the Formula to be:
CASE WHEN {customer.salesteamrole} = 'Team Lead' THEN 1 ELSE 0 END
then choose 'equal to' in the operator field and put 1 for the value.

DAX Rank by Date

I am Counting on Distinct ID's in a column - this is leading to the sum of the subtotals not equalling the grand total as follows:
What I want to do is rank the Payment Dates in cronological order and select ONLY the highest date to display. In the example above the Grand Total won't change, but the Townville row will not show a Distinct Student Count.
This is a very specific requirement and I'm assuming there's an easy way to do it in DAX - I've tried playing around with both RANKX and MAX but am no closer to solving this.
One last thing - the Rank must be contextual to the Time Filter selected by the user (so if they select 2015 it'd give the second record Rank 1 and the top record wouldn't show. If they select May 2015 it'd give the top record Rank 1 and the second record wouldn't show)
I think this is what you are looking for - I added a calculated column to the PowerPivot model that provides a rank based on the Last Payment Date and the Name of the Student. It will rank the earliest payment for any student as a 1.
The code for the column is as follows:
=RANKX(FILTER(Table1, [Student Name] = EARLIER([Student Name])), [Last Payment Date])
... assuming your table is named "Table1"!
The FILTER is the key that limits the ranking to dates belonging to students with that name only.
Update for Multiple tables
To set up relationships between the tables, go to the "Diagram View" of the model, available in the Home tab of the Power Pivot window.
You can drag fields from one table to the other to create relationships. This will only work if at least one of the fields is unique - it's a good idea to think of the model as a dimensional model, with a tables that acts like a fact and other tables around it that act like dimensions.
From the comment, I would try to get the Payments to act like the fact, and have it link to the Community and Student tables. in this case, you could then have the following code:
=RANKX(FILTER(Table1, Related('Students'[Student Name]) = EARLIER('Students'[Student Name])), [Last Payment Date])
This calculated column would be on your Payments Fact table, and it uses a lookup to a related field.
Note that in this specific case, it would be easier to just run the filter over your Student ID field that is used to lookup the Student name.

Sharepoint 2013 - Refresh List Item with Data from a Different List

In Sharepoint 2013 I have 2 (simplified) lists:
Suppliers
Supplier Number
Buyer Name
Buyers
Supplier Number
Buyer Name
In the Suppliers list, I need to periodically update the Buyer Name for all rows in the list. The buyer assignments are periodically changing.
I don't think I can use a lookup field in the Suppliers list because the data is being exported to the list from an Access 2003 database. The Supplier Number is not being manually entered into the list.
What is the best way to create a routine that will get the value in Suppliers.Supplier Number, look it up in the Buyers list, then update Suppliers.Buyer Name with that value, assuming one is found?
I just need to be pointed in the right direction, I think.
Thanks
Mike Thomas
What you are trying to achieve is feasible with the use of SharePoint Timer Job. Where you can write a logic about reading a one list(Suppliers) and settings its value in the another list(Buyers). You can also set its running time as Daily, Monthly , Yearly or even every minutes
Refrence:
https://sharepoint.stackexchange.com/questions/43965/copy-an-item-from-one-list-to-another-list-using-custom-timer-job-creation

Resources