cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
9192gks
Helper III
Helper III

Dax to return field value of one column present multiple times in another column

I was searching for a DAX to return true if ID column value of Table 2 is present multiple times in different Group(Table 1).

Table 1 :

9192gks_1-1639581535417.png

Table 2 : 

9192gks_2-1639581589761.png

I would like to create a "Check" DAX column to return ID value present in Table 1 multiple time for different Group 

 

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @9192gks ,

 

If you want to create a new table, try:

table = SUMMARIZE(Table1,Table1[ID],"ifmultiple",IF(CALCULATE(DISTINCTCOUNT(Table1[Group]),ALLEXCEPT(Table1,Table1[ID]))>1,"true","false"))

Capture.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

3 REPLIES 3
v-jayw-msft
Community Support
Community Support

Hi @9192gks ,

 

If you want to create a new table, try:

table = SUMMARIZE(Table1,Table1[ID],"ifmultiple",IF(CALCULATE(DISTINCTCOUNT(Table1[Group]),ALLEXCEPT(Table1,Table1[ID]))>1,"true","false"))

Capture.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Samarth_18
Super User
Super User

Hi @9192gks 

 

Try this:-

 

Column =
CALCULATE (
    COUNTROWS ( __Table1 ),
    FILTER ( __Table1, __table1[ID] = EARLIER ( ___table2[ID] ) )
) > 1

 

Output:-

Samarth_18_0-1639584209368.png

 

 

Thanks,

Samarth


If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin


Thanks for Replying, I was actually looking for grouping. As i have to check if the ID is present in different groups.

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!