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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
elcapitano
Regular Visitor

Calculating Win/Loss results

Hi everyone, 

 

Hoping to get some help with calculating a new column to denote which team won the game. The data I've loaded in the attached PBI looks as follows

 

elcapitano_0-1665062050003.png

 

I want to generate a new column called Result that would show a 1 for the team that won the game and blank (or 0) for the team that lost. E.g. the outcome for the above 3 games should be

 

elcapitano_1-1665062129883.png

 

I've created a sample PBI file with the above data here https://drive.google.com/file/d/12QO1l0U3Pk98l0kXeWSVI2ckJCz3benp/view?usp=sharing

 

Is there a neat way to do this with Power Query or would it have to be a calculated column?

 

Thank you in advance for any help you can provide.

 

 

cheers

 

Mark

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I tried to create the solution in Power Query Editor.

One of ways is to create a group table that shows win information and then merge it.

Please check the attached file.

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

I tried to create the solution in Power Query Editor.

One of ways is to create a group table that shows win information and then merge it.

Please check the attached file.

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Thank you so much - that worked really well! 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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