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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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 @Anonymous ,

 

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 @Anonymous ,

 

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
Community Champion
Community Champion

Hi @Anonymous 

 

Try this:-

 

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

 

Output:-

Samarth_18_0-1639584209368.png

 

 

Thanks,

Samarth

Best Regards,
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

Anonymous
Not applicable

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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