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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ghada9934
New Member

Calculate total number of game

Hello there, 

I have a question I just tried to calculate the total number of games for all teams but it did not work!

Screenshot (100).png

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

Hi @ghada9934 ,

 

Not very sure about what your Curry tale looks like, so I create some sample data per the description.

vcazhengmsft_0-1649678722869.png

 

vcazhengmsft_1-1649678722870.png

 

Then, create a Calculated column to count the number of games.

 

Total Number Game = CALCULATE(COUNT(Curry[date]),TREATAS(VALUES('Table'[Abbreviation]),Curry[opposing team]))

 

 

The result looks like this.

vcazhengmsft_2-1649678722872.png

vcazhengmsft_3-1649678722873.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

View solution in original post

4 REPLIES 4
v-cazheng-msft
Community Support
Community Support

Hi @ghada9934 ,

 

Not very sure about what your Curry tale looks like, so I create some sample data per the description.

vcazhengmsft_0-1649678722869.png

 

vcazhengmsft_1-1649678722870.png

 

Then, create a Calculated column to count the number of games.

 

Total Number Game = CALCULATE(COUNT(Curry[date]),TREATAS(VALUES('Table'[Abbreviation]),Curry[opposing team]))

 

 

The result looks like this.

vcazhengmsft_2-1649678722872.png

vcazhengmsft_3-1649678722873.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

amitchandak
Super User
Super User

@ghada9934 , Assume team is franchise

then a new column =

countx(filter( Table, [franchise] =earlier([franchise]) ,[franchise])

 

 

or measure

countx(filter( allselected(Table), [franchise] =max([franchise]) ,[franchise])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

It doesn't work! It gives me an error

I have another table called 'Curry' that includes Date column and season cloumn

curry team played many times against the same opposing team in one season

so, I assume we need to use Date and Season column 

Here's the best advice anyone can give you: How to Get Your Question Answered Quickly (powerbi.com)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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