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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

DAX Measure to count how many players played all Games [ 3 Games or 2 Games or 1 Games]

Hello Members

 

I'm trying to calculate DAX Measure to count how many players played all 3 Games or 2 Games or 1 Games [sample datasets attached]sampledatasets.png. Please note the Distinct Count Games is DAX formula. Please help me in solving this puzzle. The final out put should look something like this [Below mentioned]. Lastly the column header should like this 1 Game || 2 Game || 3 Game 

finaloutput.jpg

1 ACCEPTED SOLUTION

@Anonymous 

Please check the file now: 

You can download the file: HERE

 

Replace your Distinct Count Games measure with mine.

Game Count Measure = 
var _Count = SELECTEDVALUE( 'Game Count'[Count] ) return

SUMX(
    VALUES(Games[Person ID]),
    IF( [Distinct Count Games]  = _Count , 1 )
)

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

5 REPLIES 5
wdx223_Daniel
Super User
Super User

@Anonymous 

say you have created a dimension table,NewDimTable, which have two columns,. Category column has 1 Game || 2 Game || 3 Game, and Index column has 1,2,3.

then draw the column of Category into column of visual, and put below measure in the value area.

=VAR _games=MAX('NewDimTable'[Index]) RETURN COUNTROWS(FILTER(ALL('FactTable'[Persion ID),[DistinctCount Game]=_games))

 

Fowmy
Super User
Super User

@Anonymous 

You can create a support table and link on the Distinct Count Column show in Matrix.

You can download the file: HERE

Fowmy_0-1603997233273.png

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

thanks @Fowmy

 

as mentioned the distinct count is DAX measure not a standalone table.  so the distinct count of team in my table from my orginal mail arrived from DAX. hope that clarify. 

@Anonymous 

Please check the file now: 

You can download the file: HERE

 

Replace your Distinct Count Games measure with mine.

Game Count Measure = 
var _Count = SELECTEDVALUE( 'Game Count'[Count] ) return

SUMX(
    VALUES(Games[Person ID]),
    IF( [Distinct Count Games]  = _Count , 1 )
)

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Thank you @Fowmy -  it worked brilliantly. Much appreciated.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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