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
May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

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 June10th!

Power BI Dev Camp Session 22 without aka link and time 768x460.jpg

Check it Out!

Watch Session 22 Ted's Dev Camp along with past sessions!

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!

Top Kudoed Authors