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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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