Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Katek10
Frequent Visitor

Fill in data in a column for same duplicate value from other column

Dear PBI Community, 

     I have 2 tables related to each other by IP Address column (many-to-many). In one of them I want to reflect the "support group" data, which is only in the 2nd table. So I get the correct input, however I wonder whether I could do something to have confirmed support group per IP Address filled in for all duplicate entries. 

    The reason why I have duplicate entries, as shown in the sample table, is because for each IP/server there are multiple changes with a different implementation status (not sure if relevant, each change may be valid for several servers e.g. change no. may 1 apply to server 2,3,4 etc).

 

Many thanks in advance for your feedback/support!

SampleTable.png

 
1 ACCEPTED SOLUTION

New column in table 1

Support Group = minx(FILTER(Table2,Table2[Hostname]=Table1[Hostname] && Table1[IP Address]=Table2[IP Address]),Table2[Support Group])

View solution in original post

9 REPLIES 9
amitchandak
Super User
Super User

Try

support Group = minx(filter(table,table[ip]=earlier(table[ip]) && not(isblank(table[support Group]))),table[support Group])

Or
support Group = minx(filter(table,table[ip]=earlier(table[ip]) && not(isblank(earlier(table[support Group])))),table[support Group])

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

Hello @amitchandak

      I get the error message below: 

A single value for column "IP Address" in table1
cannot be determined. This can happen when a measure
formula refers to a column that contains many values
without specifying an aggregation such as min, max, count,
or sum to get a single result.

* indeed, in both tables there might be empty values in IP Address columns, or an IP address can be found only in one of them. Don't care whether the data based on which I've related those 2 tables is accurate/complete, the gap is acceptable for me.

What I want is - at least for the IPs which I have in both tables and for those for which in table 2 I have confirmed the support group - to be able to count how many servers or IP addresses per support group are in each implementation status. And currently, I can't precisely count that due to blank fields from column Support Group. 

 

Best regards,

Catalin

create it as a new column.

Hello @amitchandak

 

          That's exactly what I tried to do - create a calculated column with those DAX formulas, in both cases retrieved the same error. 

 

Cheers

Can you share sample data. If possible please share a sample pbix file after removing sensitive information.Thanks.

My Recent Blog -

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Hello @amitchandak , 

 

   Shared you moments ago a test .pbix on OneDrive. Tried to reproduce the data set I have in my original tables - while "playing" with these test tables, I was surprised to notice some differences in the report compared with original data set: can't see listed all the IPs (although I have support group for all IPs) and I don't have blanks for duplicate IPs/hostnames. 

   Wonder whether I should do some cleanup in my source table with support groups, like creating a 3rd table with 2 columns from that table - list only entries with IPs and support groups. I simply don't get it why I get those blanks for duplicate IPs using original data sources. 

 

Cheers

Katek

Hello, 

 

         Thought I might have done a typo somewhere in those formulas, so went back to my original data sources and did the following:

1. create new calculated column (repeated this in both table1 and table2) 

2. pasted the DAX formula: 

Support Group = minx(filter(table2,table2[Ip Address]=earlier(table2[Ip Address] && not(isblank(table2[Support

Group]))),table2[Support Group])) -> where table2 - the only table where I have the support groups. 
        Now I get the message error saying that "too many arguments were passed to FILTER function. The maximum argument count for the function is 2.". When I point on table2[Ip Address] after "earlier" it says that parameter is not the correct type and when I go on last "table2[Support Group]" it says "unexpected expression '[Support Group]'". 
 
Cheers,
K
        

New column in table 1

Support Group = minx(FILTER(Table2,Table2[Hostname]=Table1[Hostname] && Table1[IP Address]=Table2[IP Address]),Table2[Support Group])

Many thanks indeed Amit!

 

        It works!!! I get the expected outcome, no blanks for duplicated IPs, support groups are duplicated as many times as IPs are. Really appreciate all your time spent on this and your support!

 

Cheers,

K

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.