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
rohitbinnani
Advocate III
Advocate III

DAX query for Games Winning %

In power BI i want to filter by Team A's Bangalore and want Winning % of Bangalore as Team A. i.e. if i Filter with Bangalore from Team A i want (Winner/Team A)*100 which shows me the winning % of Bangalore also it should match the exact figure if i filter it with Year. This Data set is just an Example of of my Question, my actual data set is sensitive and very huge so can't post it here. Also Team A column belongs from a different table and Winner Belongs from a different table. So how can i create a Dax Query for this ?

Match Against MizoramMatch Against Mizoram

 

Thanks and Regards,

Rohit Binnani

 

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @rohitbinnani,

 

Since column [Team A] belongs from a different table and [Winner] comes from another table, you should first combine them into a single table based on specific relationship. 

 

As I don't know what relationship is between the original two tables, suppose the combination table looks like above you posted. And there are two slicers in your report, one is for [Team A], another is for [Year]. In that case, please create measures like:

CountSelectedWinner =
CALCULATE (
    COUNTA ( 'Game Winning'[Winner] ),
    FILTER (
        'Game Winning',
        'Game Winning'[Winner] = LASTNONBLANK ( 'Game Winning'[Team A], 1 )
    )
)

CountTeamA =
CALCULATE (
COUNTA ( 'Game Winning'[Team A] ),
FILTER (
'Game Winning',
'Game Winning'[Team A] = LASTNONBLANK ( 'Game Winning'[Team A], 1 )
)
)

Winning% = [CountSelectedWinner]/[CountTeamA]

1.png

 

If I have something misunderstood, please provide more description about your requirement.

 

Thanks,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yulgu-msft,

 

i tried it with different table. what if my filter of Team A is in and connected in this table as per a primary key. we have team A in this table itself but i have another dimension from which i am bringing my Team A as filter just because that is also connected to some more tables to filter them too. can you help me in this ?

the script you provided works perfect if they belong from same table. !!!

 

Regards,

Rohit Binnani.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.