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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

New column : Exist id between category

Hello everybody,

 

I need your help to add a make a calculate column for my table. 

I have this kind of table, Where I want to add a new column that depend from the "category" and "id":

for each value, of column "id" : check if it's exist as a value on the two category (groupe 1 and groupe 2)

As the example :

  • for id1(column id), we find it on the category : groupe 1 and groupe 2 so result  get id1.
  • for id2(column id), we not find on the category : groupe 1 so result  get N/A
  • for id3(column id), we not find on the category : groupe 2 so result  get N/A
  • ....
  • for id5(column id), we find it on the category : groupe 1 and groupe 2 so result  get id5
  • .....

Table : 

CategoryidNew column
groupe1id1id1
groupe2id2N/A
groupe1id3N/A
groupe1id4N/A
groupe2id5id5
groupe1id5id5
groupe2id6N/A
groupe2id1id1
groupe2id2N/A

 

Thanks you for your help.

 

Best,

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try new column like

new column =
var _val = id
return
if(calculate(Distinctcount(Table[Category]),filter(Table,[Id]= _val)) =2, [id], "N/A")

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try new column like

new column =
var _val = id
return
if(calculate(Distinctcount(Table[Category]),filter(Table,[Id]= _val)) =2, [id], "N/A")

Anonymous
Not applicable

Thank you @amitchandak 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.