duplicates
16 TopicsFind or Count Duplicates in Power BI Table
Hello, To find or count duplicates in a table, watch this Video. Sometimes you want to find duplicates to root the problem, sometimes for your analysis and sometimes, you'll need as condition for another calculations... https://www.youtube.com/watch?v=JI-QUASKuUw696Views4likes2CommentsDuplicate IDs with criteria
I have a table with an ID column, a column "Origin" and a date column. ID Origin Date 12 Web 1/1/2024 12 Other 1/2/2024 13 Other 1/2/2024 14 Web 1/3/2024 14 Other 1/3/2024 15 Other 1/3/2024 15 Web 1/4/2024 15 Other 1/4/2024 16 Other 1/4/2024 17 Web 1/4/2024 17 Web 1/5/2024 18 Web 1/5/2024 18 Other 1/5/2024 If an ID is repeated in one day and one of the origins = "Other", then I want that ID to be "Other", not "web". Basically, "Other" trumps "Web" if an ID belongs to both in the same day. How can get a table to reflect this via DAX, not power query? I have no code, I don't know what to even try.Solved741Views0likes2CommentsPBI Report Builder - removing duplicate values in parameter dropdown
I'm currently working through building a paginated report with PBI Report Builder, but a small issue came up. One of my parameters is called Spend Year. Currently, for the sake of working with a faster loading file, I filtered this down to only include the year 2023. However, the issue with this is that the parameter dropdown is displaying multiple options for 2023. I believe it's displaying a 2023 for each row in the dataset that contains one. Having multiple options for the same thing just isn't practical, so I've been looking for a way to have the parameter dropdown display distinct options. I managed to find this article: https://www.c-sharpcorner.com/article/remove-duplicate-filter-values-from-ssrs-parameter-drop-down/. While this matches my situation, the VB code that he writes is for String values. I'm working with integers. I tried my best to adapt his code to work for integers (you can find the code below), but after following through everything, my Spend Year parameter is now greyed out with no selectable values. I was sure to configure the available values as detailed in the article. Does anyone happen to have any idea how I should go about this? If it's useful to know, my data was pulled via a DAX query. Thank you in advance! My version of the code: Public Shared Function RemoveDuplicates(parameter As Parameter) As Integer() Dim items As Integer() = parameter.Value Array.Sort(items) Dim k As Integer = 0 For i As Integer = 0 To items.Length - 1 If i > 0 AndAlso items(i) = items(i - 1) Then Continue For End If items(k) = items(i) k += 1 Next Dim unique As Integer() = New Integer(k - 1) {} Array.Copy(items, 0, unique, 0, k) Return unique End Function4KViews0likes3CommentsAuto-exist and duplicated measure problem when using two Dim tables in a visual
Dear PBI community, I searched a lot about this issue on the forum and elsewhere, and I couldn't find the solution. Here is the situation. Let's first present the data. I created a simple fake data model to illustrate the problem I'm encountering. I have four tables in my model Three dimension tables : Interviewer Office Calendar One fact table : Transactions Here is the Interviewer table (dim) Interviewer ID Office ID Interviewer Name 1 1 Paul 2 1 John 3 2 Anne 4 2 Gabriel 5 3 Alain 6 3 Chrystine 7 4 Marie 8 4 Steve Here is the Office table (dim) : Office ID Office name 1 Montreal 2 Ottawa 3 Toronto 4 Vancouvert Here is the calendar table (dim) : Date 01-Nov-23 02-Nov-23 03-Nov-23 04-Nov-23 05-Nov-23 Here is the Transaction table (fact) : Transaction ID Transaction date Interviewer ID Office ID Sample Unit ID Response Outcome 1 01-Nov-23 1 1 1000 0 2 01-Nov-23 2 1 1000 1 3 01-Nov-23 3 2 1001 0 4 01-Nov-23 4 2 1004 0 5 02-Nov-23 5 3 1001 1 6 02-Nov-23 6 3 1004 1 7 02-Nov-23 7 4 1003 1 8 02-Nov-23 8 4 1003 0 9 03-Nov-23 3 2 1003 0 10 03-Nov-23 4 2 1002 1 11 03-Nov-23 5 3 1006 0 12 03-Nov-23 6 3 1001 1 13 04-Nov-23 2 1 1002 0 14 04-Nov-23 3 2 1004 0 15 05-Nov-23 2 1 1006 0 16 05-Nov-23 3 2 1005 1 17 05-Nov-23 4 2 1008 1 18 05-Nov-23 5 3 1001 0 19 05-Nov-23 6 3 1005 1 20 05-Nov-23 7 4 1007 0 21 05-Nov-23 8 4 1008 0 22 05-Nov-23 6 3 1007 0 23 05-Nov-23 2 1 1006 1 Here is my data model : Each Interviewer belongs to only one Office. Each interviewer have some transactions in the Transaction table. My basic measure is the number of responses by Interviewer. The number of response is defined as the number of unique Sample Unit ID for which we have Response Outcome = 1, which correspond to the following measure : Number Responses = CALCULATE( COUNTROWS( VALUES(Transactions[Sample unit ID]) ),Transactions[Response Outcome] = 1 ) With this measure, I can create the simple table below that works properly : The problem comes when I want to add the total number of response by Office in the same table. I use the following measure to do so : Number Responses Office = CALCULATE( [Number Responses], ALLSELECTED(Interviewer) ) My problem may be in this formula, but I need to use ALLSELECTED() filter function because I need to be able to modify this measure from the external slicers. Here is the result I get when I add this measure in my table : As you can see, since I'm using two columns from two different dim tables, the Auto-Exact feature is disabled and I get the full cardinality of the tables Interviewer and Office (all possible combinations). The values of the measure "Number Responses Office" are accurate but it created a lot of impossible combinations of Interviewer and Office. How can I avoid this ? I don't want to manually filter out the rows where "Number Responses" = 0, because an interviewer may have no response, ans still be a valid data point. I would like to correct my measure so that it do not create all the impossible combinations of interviewers and offices. You can acces my PBIX fiel here : https://drive.google.com/file/d/1SoKd0ze7xRII27cY5vtgNDkavOaiSZID/view?usp=sharing Please let me know if the link doesn't work. Any help will be much appreciated! Thanks,Solved1.7KViews0likes6CommentsHighest value of a duplicate
Hello, I am new to Power Bi and am trying to find the highest step used for duplicating item IDs. Below is the data I am working with. Item. Step. A. 1 A. 2 A. 3 A. 4 B. 1 B. 2 B. 3 in this dataset the "item" data is repeated as the items move through different steps. I am only interested in using data from the last step. This is what I would like to filter the table down to item. Step. A. 4 B. 3 Although similar posts exists, these data are different because the item column and the step column both have repeats information. I need to identify the highest step for every single unique item. An additional challenge is the maximum number of steps for different items varies. how would I go about this? similar to: http://community.powerbi.com/t5/DAX-Commands-and-Tips/Highest-Value-of-duplicate/m-p/1689664 thanksSolved1.5KViews0likes2CommentsCount repeated values on three columns
Hello: I have a "Table" with three columns, A, B and C, filled with many different string values. I want to find how many rows of that table have all three columns equal to another row in the table. In other words, find rows with duplicate "A+B+C". In a visual I would need a number, indicating how many non unique values there are, combining the three columns. Is there a formula to achieve this or do I have to concatenate all three columns in one first and then somehow count the duplicates? Thank you very much and regards.1.7KViews0likes5CommentsIdentifying duplicates
We are currently trying to replicate some reporting we already do in excel and use Power BI instead and have hit a snag. Our data contains 2 identifying markers which we call Home and Away and make up a relationship which look like: AE001/AE002 AE001/AE004 AE001/AE005 AE001/AE006 AE001/AE008 AE001/AE009 AE001/AE010 AE001/AE012 AE002/AE001 These are always in alphabetical order and we currently use the following formula to identify duplicates. =IF(ISERROR(INDEX($F$1:F1,MATCH(RIGHT(F2,5)&"/"&LEFT(F2,5),$F$1:F1,0))),"","Duplicate") Is there something similar that can be done in PowerBI? ThanksSolved2.4KViews0likes9CommentsFind duplicates between "date selected" and "date selected" - 30 days
Hi! 🙂 I have date filters (slicer) for year, month and day in a model that uses a table with [ID] and [Date] I want to show the duplicates between the "Date selected" and ("Date selected" -30 days) This is the table: If i select "December 1st, 2022" it should only show these: Thank you!1.1KViews0likes3Comments