March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All,
I have the below data which I want to represent in a pie chart showing percent of team batting first won vs team bowling first won.
Please let me know if anything else is required.
Team 1 | Team 2 | Toss winner | Toss decision | Winner |
abc | xyz | abc | bat | xyz |
xyz | rst | xyz | bowl | xyz |
rst | xyz | xyz | bowl | xyz |
abc | xyz | xyz | bat | abc |
xyz | abc | abc | bowl | abc |
abc | rst | rst | bat | rst |
rst | xyz | rst | bowl | xyz |
xyz | abc | abc | bat | xyz |
abc | xyz | abc | bowl | abc |
xyz | rst | xyz | bowl | rst |
rst | abc | abc | bat | rst |
abc | rst | abc | bowl | rst |
rst | abc | rst | bowl | abc |
abc | rst | rst | bat | rst |
xyz | abc | xyz | bowl | xyz |
rst | xyz | xyz | bat | xyz |
abc | rst | rst | bat | rst |
Solved! Go to Solution.
Hi @shikhar6339 ,
You cna create a column with below code:-
Bat_or_bowl_first = if(Table_[Toss winner] = Table_[Winner] && Table_[Toss decision] = "bat",1,0)
Now create these two measure:-
_bat_first = COUNTROWS(FILTER(Table_,Table_[Bat_or_bowl_first] = 1))
_bowl_first = COUNTROWS(FILTER(Table_,Table_[Bat_or_bowl_first] = 0))
Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @shikhar6339 ,
You cna create a column with below code:-
Bat_or_bowl_first = if(Table_[Toss winner] = Table_[Winner] && Table_[Toss decision] = "bat",1,0)
Now create these two measure:-
_bat_first = COUNTROWS(FILTER(Table_,Table_[Bat_or_bowl_first] = 1))
_bowl_first = COUNTROWS(FILTER(Table_,Table_[Bat_or_bowl_first] = 0))
Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |