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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JulienV
New Member

Create count or Max column on table

Hello,

 

I have a table with the following data (in black below)

I am trying to add a calculated Column or Measure to create a new column "AnyoneCompletedInGroup" (in red below)

in That column ,it shows true, if anyone in a given group has "Completed" = True

 

Attendee   Group   Completed   AnyoneCompletedInGroup
1G1TrueTrue
2G1FalseTrue
3G1TrueTrue
4G2FalseFalse
5G2FalseFalse

 

So in example above, it shows true for all G1 record since two people have completed it. but since no one in G2 completed it shows false.

What would be the DAX to generate that column (or measure)

 

Thank you for your help

1 REPLY 1
Pragati11
Super User
Super User

Hi @JulienV,

 

I have considered the following data:

Pragati11_0-1612349420749.png

Now I created a measure to count number of TRUEs in completed column:

No of TRUE by Group =
var t1 = CALCULATE(COUNT(Attendee[Attendee]),
FILTER(ALL(Attendee), Attendee[Completed] = "True" &&
SUMX(
FILTER((Attendee), EARLIER( Attendee[Group]) = Attendee[Group]), Attendee[Attendee] )
)
)
RETURN
IF(t1 > 0, t1, 0)
 
Then I just check this calculation at GROUP level and it looks right:
c1.PNG
 

Now I create a second measure for the required output.

AnyoneCompletedInGroup =
IF(
[No of TRUE by Group] > 0, "True", "False"
)
 
Now move this to a table visual to check:
c2.PNG
 
This is the expected result as per your query.
 
Thanks,
Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.