hello everyone,
I have a requirement where I am supposed to display the request_id and other details for just the multiple/duplicate payments in Spotfire based on bank name and bank account number.
The approach I took was to create a calculated column with rowid that has same bank name and bank account number. After that, filter the data for which the rowid is greater than 1. But with this approach, along with non-duplicate request_id, I also filter the row_id "1" of the duplicate payment. Below is my sample code and data:
calculated column for duplicate: Rank(RowId(),"asc",[Payee Bank Account Number],[Payee Bank Name])
Data Filter: [calculated column for duplicate]>1
with my current approach, you can see request_id "387" will be missing from the final report.
#Shane- Quick review of your approach: If you rank Bank A/C and Bank name columns, the duplicate as well as non-duplicate ones will be ranked. In that case, when you filter records based on the condition [calculated column for duplicate]>1, the request_id's which are ranked 1 will be ignored.
Instead of RANK, you could use COUNT.
As your goal is to find duplicates, COUNT will suit this scenario.
Please try the below solution.
If(Count([Bank A/C]) over ([Bank name],[Bank A/C])>1,[request_ID])
Here is the final output of the table:
Hope this answers your question!
Related
I've got a table of order data where instalment payments are used in Excel. The first column is the customer's email address and the second is the product they've bought. The third is whether the row is for an initial payment, or for a subsequent instalment payment.
I need to basically identify in the data whether or not any given customer has made instalment payments for a specific product. If they have made instalment payments, that customer will have multiple rows for a specific product. The data looks something like this.
CUSTOMER COURSE PAYMENT TYPE
joe#blogs.com Course 1 First
bill#blogs.com Course 1 First
joe#blogs.com Course 2 First
joe#blogs.com Course 1 Instalment
Basically, the formula would need to identify that whilst Joe has made three payments, only two of them are for the same course and therefore only one of them is an instalment payment. It would return something like 'Yes' in both the first and fourth rows as those rows are linked to the same customer with the same course.
How would I go about doing this? So far, I have only got as far as identifying where the customer has multiple rows, like so:
$A$2:$A$2579=A2
But this only identifies when the user has multiple orders, but doesn't take into account if those orders are for the same course, or what type of payment it is.
What would the formula look like to solve this problem?
Thanks!
You can use e.g. this formula:
=IF( COUNTIFS($A$2:A2,A2,$B$2:B2,B2)=1,"First","Installment")
The key is using relative and absolute references together in order to refer only previous rows, not the whole range.
I'm trying to create a saved search that groups invoices by amount in buckets of $1,000. Then I would like to count the number of invoices in that range.
What I have tried is creating a grouped text formula with the formula TO_CHAR(ROUND({amount}, -4)) and then another column that is the internal id with the Count summary type. This would work but NetSuite says the formula text column cannot be grouped, presumably because it uses the amount field in the formula.
Does anyone know of an alternate way that I can accomplish this?
If I understand well your needs,
The current formula, group all the transaction from 0 to 4999 together, ...
I have updated it to group all the transaction from 0 to 999, then 1000 to 1999 and so on:
a text formula with the following:
(count/* comment */(ROUND(TRUNC({amount},-3),-3)) OVER(PARTITION BY (ROUND(TRUNC({amount},-3),-3)) ORDER BY (ROUND(TRUNC({amount},-3),-3)))
I have a list of all orders placed in a time range and I am trying to calculate the difference between each customer's first and second order. I have a list of unique customer IDs on another tab and I already have the first order date for each. I need a way to grab the date of the second order, corresponding to each customer ID.
In the sample data below, the correct output of this formula for customer ID "153950" would be "5/11/17 8:41".
Use AGGREGATE()
=AGGREGATE(15,6,Sheet1!C1:C4/(Sheet1!A1:A4 = 153950),2)
The ,2 is grabbing the second smallest 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.
I am pretty new with POWERPIVOT tables. I have searched for a bit of time now to resolve my problem but I have been unsuccessful so far. As you can see below, I have created a POWERPIVOT table in Excel 2013 that is composed of two FACT tables, which are based on: 1) a sheet where the clients can insert vote 1 budget entries; and, 2) another sheet where the clients can insert vote 5 budget entries. Also, a few DIMENSION tables have been added to the combination in order to link the Branch names and the expenditure type. Please note that this is only a simple example of what I am trying to produce.
However, my main problem is that I can't add a sub-total that would sum Salary, Operating and Revenues for Vote 1 and Vote 5 separately. What I would like to show is the following:
Please note that I have tried calculated columns and calculated fields at the best of my knowledge but the results are always showing another set of columns for Salary, Operating and Revenues but what I need is just one column that sum the three components so it displays Salary, Operating, Revenues and Sub-Total. Does anyone know how to resolve this problem that I am facing since a long time?
Thanks to gurus.
I would suggest that you start by putting both budgets in the one table and an extra column to designate Vote id., Otherwise I fearyou will need to add a calculated column concatenating the Branch and Expenditure Type in each table, then doing a LOOKUPVALUE from Vote1 on the concatenated column to Vote5 and pull back the value.