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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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